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

[PATCH 15/28] makes sha1flush void

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 14, 2006, 20:32 UTC
Message-ID
<Pine.LNX.4.63.0608141331160.19383@chino.corp.google.com>
Makes sha1flush void and removes conditional return.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 combine-diff.c |    4 +---
 csum-file.c    |    4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/combine-diff.c b/combine-diff.c
index f2f3806..312035a 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -9,9 +9,7 @@ #include "log-tree.h"
 
 static int uninteresting(struct diff_filepair *p)
 {
-	if (diff_unmodified_pair(p))
-		return 1;
-	return 0;
+	return !!diff_unmodified_pair(p);
 }
 
 static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr, int n, int num_parent)
diff --git a/csum-file.c b/csum-file.c
index 6a7b40f..e227889 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -10,7 +10,7 @@
 #include "cache.h"
 #include "csum-file.h"
 
-static int sha1flush(struct sha1file *f, unsigned int count)
+static void sha1flush(struct sha1file *f, unsigned int count)
 {
 	void *buf = f->buffer;
 
@@ -21,7 +21,7 @@ static int sha1flush(struct sha1file *f,
 			count -= ret;
 			if (count)
 				continue;
-			return 0;
+			return;
 		}
 		if (!ret)
 			die("sha1 file '%s' write error. Out of diskspace", f->name);
-- 
1.4.2.g89bb-dirty
Message 1 of 1 in “makes sha1flush void”
  1. 15/28 makes sha1flush voidDavid 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.