diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2019-11-12 13:38:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-07 00:29:04 +0300 |
commit | bf43abc6e60fc9732a287f529a6cedcbdfe2a74c (patch) | |
tree | 279315b028dd69ac3fabb054e78c49defe964ebe /builtin/name-rev.c | |
parent | e0c4da6f2adcede27fb097337c71f7b377a074a1 (diff) |
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/name-rev.c')
-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)) { |