threads / patch / 5264

patch, 28 partsmakes sha1flush void

Subject: [PATCH 15/28] makes sha1flush void

## 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:32 UTC · lore
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(-)
Show changes to 2 files +3 −5

combine-diff.c, csum-file.c

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

← back to recent threads