Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin-grep.c cleanup
author
David Rientjes
<rientjes@google.com>
Mon, 14 Aug 2006 20:22:15 +0000
(13:22 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 15 Aug 2006 01:38:07 +0000
(18:38 -0700)
Removes conditional return.
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
b4e2759
)
diff --git
a/builtin-grep.c
b/builtin-grep.c
index a561612e7efd31f92a8becd8f94516877146ad7f..3ec99b70108021b266f6470d97efce9acd02b195 100644
(file)
--- 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 (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)
}
static int fixmatch(const char *pattern, char *line, regmatch_t *match)