summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-07-14 21:35:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 16:45:21 (GMT)
commitd3c9cf32ca3b088fda54e7be311860f1f06fb11e (patch)
tree9c8b46cfb9006b55fd09d4503cc9b8aa130414ca /diff.c
parent70a0cc9e5c62f7b8ce0acc693e10a9e080f187ef (diff)
downloadgit-d3c9cf32ca3b088fda54e7be311860f1f06fb11e.zip
git-d3c9cf32ca3b088fda54e7be311860f1f06fb11e.tar.gz
git-d3c9cf32ca3b088fda54e7be311860f1f06fb11e.tar.bz2
diff.c: Do not initialize a variable, which gets reassigned anyway.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 649ec86..2747e6f 100644
--- a/diff.c
+++ b/diff.c
@@ -1683,9 +1683,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
del = deleted;
if (graph_width <= max_change) {
- int total = add + del;
-
- total = scale_linear(add + del, graph_width, max_change);
+ int total = scale_linear(add + del, graph_width, max_change);
if (total < 2 && add && del)
/* width >= 2 due to the sanity check */
total = 2;