summaryrefslogtreecommitdiffstats
path: root/usr.bin/xargs
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-05-04 05:53:02 +0000
committerjmallett <jmallett@FreeBSD.org>2002-05-04 05:53:02 +0000
commit572f35dd8be5b8f430c6b0256ae13138fca81687 (patch)
treebaa2da69b3b885c93815e3f136a9e20bf04381ce /usr.bin/xargs
parentc999bc64586905781ea82a7162fd8fe52ea895c5 (diff)
downloadFreeBSD-src-572f35dd8be5b8f430c6b0256ae13138fca81687.zip
FreeBSD-src-572f35dd8be5b8f430c6b0256ae13138fca81687.tar.gz
Don't use pointers as booleans.
Diffstat (limited to 'usr.bin/xargs')
-rw-r--r--usr.bin/xargs/xargs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c
index b14315a..4b114ad 100644
--- a/usr.bin/xargs/xargs.c
+++ b/usr.bin/xargs/xargs.c
@@ -183,7 +183,7 @@ main(int argc, char **argv)
* shell. Echo is the default. Set up pointers for the user's
* arguments.
*/
- if (!*argv)
+ if (*argv == NULL)
cnt = strlen((*bxp++ = echo));
else {
do {
@@ -195,7 +195,7 @@ main(int argc, char **argv)
break;
}
cnt += strlen(*bxp++ = *argv) + 1;
- } while (*++argv);
+ } while (*++argv != NULL);
}
/*
@@ -446,7 +446,7 @@ run(char **argv)
if (tflag || pflag) {
(void)fprintf(stderr, "%s", *argv);
- for (p = argv + 1; *p; ++p)
+ for (p = argv + 1; *p != NULL; ++p)
(void)fprintf(stderr, " %s", *p);
if (pflag && (ttyfp = fopen("/dev/tty", "r")) != NULL) {
(void)fprintf(stderr, "?");
OpenPOWER on IntegriCloud