git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e0c4da6
)
name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation
author
SZEDER Gábor
<redacted>
Tue, 12 Nov 2019 10:38:13 +0000
(11:38 +0100)
committer
Junio C Hamano
<redacted>
Fri, 6 Dec 2019 21:29:04 +0000
(13:29 -0800)
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/name-rev.c
patch
|
blob
|
history
diff --git
a/builtin/name-rev.c
b/builtin/name-rev.c
index e40f51c2b4af414f225da5099967d6605b67d7da..7e003c2702417190a72885eb6f294847d89435d4 100644
(file)
--- 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)) {
git clone https://git.99rst.org/PROJECT