diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2019-11-12 11:38:13 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 13:29:04 -0800 |
commit | bf43abc6e60fc9732a287f529a6cedcbdfe2a74c (patch) | |
tree | 279315b028dd69ac3fabb054e78c49defe964ebe /builtin | |
parent | name-rev: avoid unnecessary cast in name_ref() (diff) | |
download | tgif-bf43abc6e60fc9732a287f529a6cedcbdfe2a74c.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) { |