summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39bc9a6)
raw | patch | inline | side by side (parent: 39bc9a6)
author | Timo Hirvonen <tihirvon@gmail.com> | |
Sun, 25 Jun 2006 11:28:19 +0000 (14:28 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 26 Jun 2006 21:58:41 +0000 (14:58 -0700) |
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c | patch | blob | history |
index 491b846f6238e5915313e955ca4822fccc72707f..54698f511ae402d1051f059d926dc8682e097ba0 100644 (file)
--- a/diff.c
+++ b/diff.c
}
if (output_format & DIFF_FORMAT_DIFFSTAT) {
- struct diffstat_t *diffstat;
+ struct diffstat_t diffstat;
- diffstat = xcalloc(sizeof (struct diffstat_t), 1);
- diffstat->xm.consume = diffstat_consume;
+ memset(&diffstat, 0, sizeof(struct diffstat_t));
+ diffstat.xm.consume = diffstat_consume;
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
if (check_pair_status(p))
- diff_flush_stat(p, options, diffstat);
+ diff_flush_stat(p, options, &diffstat);
}
- show_stats(diffstat);
- free(diffstat);
+ show_stats(&diffstat);
}
if (output_format & DIFF_FORMAT_SUMMARY) {