From bf43abc6e60fc9732a287f529a6cedcbdfe2a74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Tue, 12 Nov 2019 11:38:13 +0100 Subject: name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- builtin/name-rev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin') diff --git a/builtin/name-rev.c b/builtin/name-rev.c index e40f51c2b4..7e003c2702 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -102,7 +102,7 @@ static void name_rev(struct commit *commit, } if (name == NULL) { - name = xmalloc(sizeof(rev_name)); + name = xmalloc(sizeof(*name)); set_commit_rev_name(commit, name); goto copy_data; } else if (is_better_name(name, taggerdate, distance, from_tag)) { -- cgit v1.2.3