{"thread":{"id":"5266","subject":"[PATCH 17/28] makes diff_cache void","startedAt":"2006-08-14T20:33:42Z","lastAt":"2006-08-14T20:33:42Z","messageCount":1,"participants":["David Rientjes"],"isPatch":true,"patchVersion":1,"patchTotal":28},"messages":[{"id":"25298","messageId":"Pine.LNX.4.63.0608141333030.19383@chino.corp.google.com","threadId":"5266","inReplyTo":null,"subject":"[PATCH 17/28] makes diff_cache void","fromName":"David Rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-14T20:33:42Z","receivedAt":"2006-08-14T20:33:42Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"Makes diff_cache void and cleans up function calls.\n\n\t\tDavid\n\nSigned-off-by: David Rientjes <rientjes@google.com>\n---\n diff-lib.c |   16 +++++++---------\n 1 files changed, 7 insertions(+), 9 deletions(-)\n\ndiff --git a/diff-lib.c b/diff-lib.c\nindex 116b5a9..3c42b09 100644\n--- a/diff-lib.c\n+++ b/diff-lib.c\n@@ -227,10 +227,10 @@ static int show_modified(struct rev_info\n \treturn 0;\n }\n \n-static int diff_cache(struct rev_info *revs,\n-\t\t      struct cache_entry **ac, int entries,\n-\t\t      const char **pathspec,\n-\t\t      int cached, int match_missing)\n+static void diff_cache(struct rev_info *revs,\n+\t\t       struct cache_entry **ac, int entries,\n+\t\t       const char **pathspec,\n+\t\t       int cached, int match_missing)\n {\n \twhile (entries) {\n \t\tstruct cache_entry *ce = *ac;\n@@ -292,7 +292,6 @@ skip_entry:\n \t\t\tentries--;\n \t\t} while (entries && ce_same_name(ce, ac[0]));\n \t}\n-\treturn 0;\n }\n \n /*\n@@ -313,7 +312,6 @@ static void mark_merge_entries(void)\n \n int run_diff_index(struct rev_info *revs, int cached)\n {\n-\tint ret;\n \tstruct object *ent;\n \tstruct tree *tree;\n \tconst char *tree_name;\n@@ -339,9 +337,9 @@ int run_diff_index(struct rev_info *revs\n \t\treturn error(\"bad tree object %s\", tree_name);\n \tif (read_tree(tree, 1, revs->prune_data))\n \t\treturn error(\"unable to read tree object %s\", tree_name);\n-\tret = diff_cache(revs, active_cache, active_nr, revs->prune_data,\n-\t\t\t cached, match_missing);\n+\tdiff_cache(revs, active_cache, active_nr, revs->prune_data,\n+\t\t   cached, match_missing);\n \tdiffcore_std(&revs->diffopt);\n \tdiff_flush(&revs->diffopt);\n-\treturn ret;\n+\treturn 0;\n }\n-- \n1.4.2.g89bb-dirty\n"}]}