summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-25 02:20:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-25 02:20:59 (GMT)
commit0c544a22f9297b305949bd77f15183aa8fffd8fc (patch)
treee27dd3a877d391d79031596138d513c0eb6674a1 /diff.c
parent1762224ddb599ab14ca26cedafec39dee9b92fe5 (diff)
parentd3c9cf32ca3b088fda54e7be311860f1f06fb11e (diff)
downloadgit-0c544a22f9297b305949bd77f15183aa8fffd8fc.zip
git-0c544a22f9297b305949bd77f15183aa8fffd8fc.tar.gz
git-0c544a22f9297b305949bd77f15183aa8fffd8fc.tar.bz2
Merge branch 'sb/misc-fixes'
Assorted code cleanups and a minor fix. * sb/misc-fixes: diff.c: Do not initialize a variable, which gets reassigned anyway. commit: Fix a memory leak in determine_author_info daemon.c:handle: Remove unneeded check for null pointer.
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 a4583f0..4629de2 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;