Allow commands without any additional arguments, as stated in the
manpage. While here, exit early when there is nothing to do. PR: 168415 Submitted by: Zhihao Yuan (initial version) MFC after: 1 week Approved by: kib (mentor)
This commit is contained in:
parent
eb23ab3120
commit
dee6f001b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245418
@ -72,8 +72,8 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
if (argc < 2)
|
if (argc == 0)
|
||||||
usage(0);
|
exit(0);
|
||||||
|
|
||||||
if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1)
|
if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1)
|
||||||
warn("Failed to set environment variable: %s=%s",
|
warn("Failed to set environment variable: %s=%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user