Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-11-12 13:38:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-07 00:29:04 +0300
commitbf43abc6e60fc9732a287f529a6cedcbdfe2a74c (patch)
tree279315b028dd69ac3fabb054e78c49defe964ebe /builtin/name-rev.c
parente0c4da6f2adcede27fb097337c71f7b377a074a1 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index e40f51c2b4a..7e003c27024 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)) {