diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
commit | d9a447559bc04121f7c6682e64abe67efa154864 (patch) | |
tree | b2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/stdbuf | |
parent | 3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff) | |
parent | fbda3d5daeeb730a49d025b614b35a32f0319718 (diff) | |
download | src-test2-d9a447559bc04121f7c6682e64abe67efa154864.tar.gz src-test2-d9a447559bc04121f7c6682e64abe67efa154864.zip |
Sync with HEAD.
Notes
Notes:
svn path=/projects/bmake/; revision=246555
Diffstat (limited to 'usr.bin/stdbuf')
-rw-r--r-- | usr.bin/stdbuf/stdbuf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/stdbuf/stdbuf.c b/usr.bin/stdbuf/stdbuf.c index 3831b5e3ba66..4346cc85f1a1 100644 --- a/usr.bin/stdbuf/stdbuf.c +++ b/usr.bin/stdbuf/stdbuf.c @@ -39,7 +39,7 @@ extern char *__progname; static void usage(int s) { - + fprintf(stderr, "Usage: %s [-e 0|L|<sz>] [-i 0|L|<sz>] [-o 0|L|<sz>] " "<cmd> [args ...]\n", __progname); exit(s); @@ -72,8 +72,8 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; - if (argc < 2) - usage(0); + if (argc == 0) + exit(0); if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) warn("Failed to set environment variable: %s=%s", @@ -94,7 +94,7 @@ main(int argc, char *argv[]) if (i < 0 || putenv(preload1) == -1) warn("Failed to set environment variable: LD_PRELOAD"); - + preload0 = getenv("LD_32_PRELOAD"); if (preload0 == NULL) i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); |