diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-18 23:12:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-18 23:12:57 -0700 |
commit | 954a3eb3d15fee91b5d78632c6f6a5ed5f93505f (patch) | |
tree | 78c99cf5349cb8c30832980e06c3e1bb0442cc8f | |
parent | 5b3da8d04b34f80e02c8d96bd739add0b05961a0 (diff) | |
download | grep-954a3eb3d15fee91b5d78632c6f6a5ed5f93505f.tar.gz |
grep: tune list_files conversion to enum
* src/grep.c (grepdesc): Use a slightly more-efficient way to test
list_files.
-rw-r--r-- | src/grep.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1853,8 +1853,7 @@ grepdesc (int desc, bool command_line) } status = !count; - if ((list_files == LISTFILES_MATCHING && count > 0) - || (list_files == LISTFILES_NONMATCHING && count == 0)) + if (list_files == (status ? LISTFILES_NONMATCHING : LISTFILES_MATCHING)) { print_filename (); putchar_errno ('\n' & filename_mask); |