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
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user