threads / patch / 5267

patch, 28 partsdiff.c cleanup

Subject: [PATCH 18/28] diff.c cleanup

## tl;dr

One message between Aug 14, 2006 and Aug 14, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

David Rientjes· Aug 14, 2006, 20:34 UTC · lore
Removes conditional return.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 diff.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Show changes to diff.c +1 −3
diff --git a/diff.c b/diff.c
index 8861b85..2327e60 100644
--- a/diff.c
+++ b/diff.c
@@ -904,9 +904,7 @@ static int mmfile_is_binary(mmfile_t *mf
 	long sz = mf->size;
 	if (FIRST_FEW_BYTES < sz)
 		sz = FIRST_FEW_BYTES;
-	if (memchr(mf->ptr, 0, sz))
-		return 1;
-	return 0;
+	return !!memchr(mf->ptr, 0, sz);
 }
 
 static void builtin_diff(const char *name_a,
-- 
1.4.2.g89bb-dirty

← back to recent threads