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

[PATCH 17/28] makes diff_cache void

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 14, 2006, 20:33 UTC
Message-ID
<Pine.LNX.4.63.0608141333030.19383@chino.corp.google.com>
Makes diff_cache void and cleans up function calls.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 diff-lib.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/diff-lib.c b/diff-lib.c
index 116b5a9..3c42b09 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -227,10 +227,10 @@ static int show_modified(struct rev_info
 	return 0;
 }
 
-static int diff_cache(struct rev_info *revs,
-		      struct cache_entry **ac, int entries,
-		      const char **pathspec,
-		      int cached, int match_missing)
+static void diff_cache(struct rev_info *revs,
+		       struct cache_entry **ac, int entries,
+		       const char **pathspec,
+		       int cached, int match_missing)
 {
 	while (entries) {
 		struct cache_entry *ce = *ac;
@@ -292,7 +292,6 @@ skip_entry:
 			entries--;
 		} while (entries && ce_same_name(ce, ac[0]));
 	}
-	return 0;
 }
 
 /*
@@ -313,7 +312,6 @@ static void mark_merge_entries(void)
 
 int run_diff_index(struct rev_info *revs, int cached)
 {
-	int ret;
 	struct object *ent;
 	struct tree *tree;
 	const char *tree_name;
@@ -339,9 +337,9 @@ int run_diff_index(struct rev_info *revs
 		return error("bad tree object %s", tree_name);
 	if (read_tree(tree, 1, revs->prune_data))
 		return error("unable to read tree object %s", tree_name);
-	ret = diff_cache(revs, active_cache, active_nr, revs->prune_data,
-			 cached, match_missing);
+	diff_cache(revs, active_cache, active_nr, revs->prune_data,
+		   cached, match_missing);
 	diffcore_std(&revs->diffopt);
 	diff_flush(&revs->diffopt);
-	return ret;
+	return 0;
 }
-- 
1.4.2.g89bb-dirty
Message 1 of 1 in “makes diff_cache void”
  1. 17/28 makes diff_cache 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.