Fixed option parsing. Grep would continue grepping, even when given a bad /

invalid option. Closes bug #1146.
This commit is contained in:
Mark Whitley 2001-04-09 23:00:07 +00:00
parent e5dfced23a
commit 4391a16c92
2 changed files with 4 additions and 0 deletions

View File

@ -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();
}
}

2
grep.c
View File

@ -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();
}
}