aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2001-12-11 22:36:26 +0000
committerMark Murray <markm@FreeBSD.org>2001-12-11 22:36:26 +0000
commit16b07a33f9b9a0e8ef882f362994ec26b2133bcb (patch)
treeb050a2a46c5c78ce1906bda07cadca983ea8a7d0 /usr.bin
parentfcc1eaf46de2bd8d1108443851b3c45f681ff794 (diff)
downloadsrc-16b07a33f9b9a0e8ef882f362994ec26b2133bcb.tar.gz
src-16b07a33f9b9a0e8ef882f362994ec26b2133bcb.zip
WARNS=2 fixes, remove register keyword, use __FBSDID()
Notes
Notes: svn path=/head/; revision=87684
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xargs/xargs.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c
index a9c52e4d65b2..7fb536e99dfa 100644
--- a/usr.bin/xargs/xargs.c
+++ b/usr.bin/xargs/xargs.c
@@ -34,27 +34,29 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+
+__FBSDID("$FreeBSD$");
+
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1990, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
+#endif
#ifndef lint
-#if 0
-static char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
#include <sys/types.h>
#include <sys/wait.h>
+
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
#include "pathnames.h"
int tflag, rval;
@@ -63,13 +65,15 @@ int zflag;
void run __P((char **));
static void usage __P((void));
+static char echo[] = _PATH_ECHO;
+
int
main(argc, argv, env)
int argc;
char **argv, **env;
{
- register int ch;
- register char *p, *bbp, *ebp, **bxp, **exp, **xp;
+ int ch;
+ char *p, *bbp, **bxp, *ebp, **exp, **xp;
int cnt, jfound, indouble, insingle;
int nargs, nflag, nline, xflag, wasquoted;
char **av, **avj, *argp, **ep, *replstr;
@@ -148,7 +152,7 @@ main(argc, argv, env)
* arguments.
*/
if (!*argv)
- cnt = strlen(*bxp++ = _PATH_ECHO);
+ cnt = strlen((*bxp++ = echo));
else {
cnt = 0;
do {
@@ -293,7 +297,7 @@ run(argv)
char **argv;
{
volatile int noinvoke;
- register char **p;
+ char **p;
pid_t pid;
int status;