@matheusbsbs / matheus-bagliano / commits / b756776d19
Fork 0

builtin-grep.c cleanup

Removes conditional return. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

David Rientjes committed Aug 14, 2006 at 13:22 UTC b756776d19356a961cc3d1861b15720a6d0e8462
1 file changed +1 -3
builtin-grep.c
+1 -3
@@ -390,9 +390,7 @@ static int buffer_is_binary(const char *ptr, unsigned long size)
390 {
391 if (FIRST_FEW_BYTES < size)
392 size = FIRST_FEW_BYTES;
393 - if (memchr(ptr, 0, size))
394 - return 1;
395 - return 0;
393 + return !!memchr(ptr, 0, size);
394 }
395
396 static int fixmatch(const char *pattern, char *line, regmatch_t *match)