# [PATCH 15/28] makes sha1flush void

1 messages from 2006-08-14 to 2006-08-14. Participants: David Rientjes.
Thread: https://gitlist.dev/t/5264

## David Rientjes, 2006-08-14 20:32

Subject: [PATCH 15/28] makes sha1flush void
Message-ID: <Pine.LNX.4.63.0608141331160.19383@chino.corp.google.com>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0608141331160.19383%40chino.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

```
