summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-11-12 10:38:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-06 21:29:04 (GMT)
commitbf43abc6e60fc9732a287f529a6cedcbdfe2a74c (patch)
tree279315b028dd69ac3fabb054e78c49defe964ebe /builtin
parente0c4da6f2adcede27fb097337c71f7b377a074a1 (diff)
downloadgit-bf43abc6e60fc9732a287f529a6cedcbdfe2a74c.zip
git-bf43abc6e60fc9732a287f529a6cedcbdfe2a74c.tar.gz
git-bf43abc6e60fc9732a287f529a6cedcbdfe2a74c.tar.bz2
name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/name-rev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index e40f51c..7e003c2 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)) {