From: Mark Whitley Date: Mon, 9 Apr 2001 23:00:07 +0000 (-0000) Subject: Fixed option parsing. Grep would continue grepping, even when given a bad / X-Git-Tag: 0_51~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4391a16c92cef744fc715cb7347b7b71fc8f312e;p=oweals%2Fbusybox.git Fixed option parsing. Grep would continue grepping, even when given a bad / invalid option. Closes bug #1146. --- diff --git a/findutils/grep.c b/findutils/grep.c index 475b4ef21..8c6797647 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -232,6 +232,8 @@ extern int grep_main(int argc, char **argv) before_buf = (char **)calloc(lines_before, sizeof(char *)); break; #endif /* BB_FEATURE_GREP_CONTEXT */ + default: + show_usage(); } } diff --git a/grep.c b/grep.c index 475b4ef21..8c6797647 100644 --- a/grep.c +++ b/grep.c @@ -232,6 +232,8 @@ extern int grep_main(int argc, char **argv) before_buf = (char **)calloc(lines_before, sizeof(char *)); break; #endif /* BB_FEATURE_GREP_CONTEXT */ + default: + show_usage(); } }