]> Sergey Matveev's repositories - nnn.git/commitdiff
Simplify visible()
authorsin <sin@2f30.org>
Sat, 20 Dec 2014 19:21:03 +0000 (19:21 +0000)
committersin <sin@2f30.org>
Sat, 20 Dec 2014 21:51:27 +0000 (21:51 +0000)
noice.c

diff --git a/noice.c b/noice.c
index ecad44750cfd90265735fa0d5ba8c4c291665cac..b3aff6828cc539604b90a6a3dada9c6584265c68 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -219,9 +219,7 @@ setfilter(regex_t *regex, char *filter)
 int
 visible(regex_t *regex, char *file)
 {
-       if (regexec(regex, file, 0, NULL, 0) == 0)
-               return 1;
-       return 0;
+       return regexec(regex, file, 0, NULL, 0) == 0;
 }
 
 int