From: David Rientjes Date: Mon, 14 Aug 2006 20:22:15 +0000 (-0700) Subject: builtin-grep.c cleanup X-Git-Tag: v1.4.3-rc1~253 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b756776d19356a961cc3d1861b15720a6d0e8462?hp=b4e275992f7ea56b7944abb2b9339c7f6f5c9423 builtin-grep.c cleanup Removes conditional return. Signed-off-by: David Rientjes Signed-off-by: Junio C Hamano --- diff --git a/builtin-grep.c b/builtin-grep.c index a561612e7e..3ec99b7010 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -390,9 +390,7 @@ static int buffer_is_binary(const char *ptr, unsigned long size) { if (FIRST_FEW_BYTES < size) size = FIRST_FEW_BYTES; - if (memchr(ptr, 0, size)) - return 1; - return 0; + return !!memchr(ptr, 0, size); } static int fixmatch(const char *pattern, char *line, regmatch_t *match)