diff options
author | Ron Yorston | 2023-04-16 08:23:58 +0100 |
---|---|---|
committer | Denys Vlasenko | 2023-04-16 17:54:00 +0200 |
commit | 2ffd8986e21f1782c78e1a9d34f6042af53d876c (patch) | |
tree | 4568168a9e693d3e0abb8e9d63d6d2025404b722 | |
parent | acae889dd97280ee59b7e04c18005bb8875cb0d2 (diff) | |
download | busybox-2ffd8986e21f1782c78e1a9d34f6042af53d876c.zip busybox-2ffd8986e21f1782c78e1a9d34f6042af53d876c.tar.gz |
tr: display usage for incorrect arguments
tr must have one or two non-option arguments. Display the usage
message if any other number is present.
function old new delta
.rodata 108389 108392 +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 3/0) Total: 3 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | coreutils/tr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c index 1e402df..7fe7f89 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -299,7 +299,7 @@ int tr_main(int argc UNUSED_PARAM, char **argv) */ /* '+': stop at first non-option */ - opts = getopt32(argv, "^+" "Ccds" "\0" "-1"); + opts = getopt32(argv, "^+" "Ccds" "\0" "-1:?2"); argv += optind; str1_length = expand(*argv++, &str1); |