[PATCH 17/28] makes diff_cache void
From: David Rientjes <rientjes@google.com>
Date: 2016-06-15 22:42:37
Subsystem:
the rest · Maintainer:
Linus Torvalds
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