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

[PATCH 26/28] makes show_entry void

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 14, 2006, 20:39 UTC
Message-ID
<Pine.LNX.4.63.0608141338500.19383@chino.corp.google.com>
Makes show_entry void.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 tree-diff.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tree-diff.c b/tree-diff.c
index 1cdf8aa..916f489 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -15,7 +15,8 @@ static char *malloc_base(const char *bas
 	return newbase;
 }
 
-static int show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc, const char *base);
+static void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,
+		       const char *base);
 
 static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const char *base, struct diff_options *opt)
 {
@@ -131,7 +132,8 @@ static void show_tree(struct diff_option
 }
 
 /* A file entry went away or appeared */
-static int show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc, const char *base)
+static void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,
+		       const char *base)
 {
 	unsigned mode;
 	const char *path;
@@ -152,11 +154,9 @@ static int show_entry(struct diff_option
 
 		free(tree);
 		free(newbase);
-		return 0;
+	} else {
+		opt->add_remove(opt, prefix[0], mode, sha1, base, path);
 	}
-
-	opt->add_remove(opt, prefix[0], mode, sha1, base, path);
-	return 0;
 }
 
 int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, struct diff_options *opt)
-- 
1.4.2.g89bb-dirty
Message 1 of 1 in “makes show_entry void”
  1. 26/28 makes show_entry 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.