git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 18/28] diff.c cleanup

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 14, 2006, 20:34 UTC
Message-ID
<Pine.LNX.4.63.0608141333430.19383@chino.corp.google.com>
Removes conditional return.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 diff.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
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
Message 1 of 1 in “diff.c cleanup”
  1. 18/28 diff.c cleanupDavid Rientjes, Aug 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.