diff --git a/apps/grep.c b/apps/grep.c index d7e056f1..7d9cb664 100644 --- a/apps/grep.c +++ b/apps/grep.c @@ -290,7 +290,7 @@ int main(int argc, char ** argv) { optind++; - int showFilenames = (optind + 1 != argc); + int showFilenames = (optind + 1 < argc); do { FILE * input = stdin;