projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69d3226
)
kconfig/symbol.c: use correct pointer type argument for sizeof
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Wed, 8 Nov 2017 21:13:54 +0000
(22:13 +0100)
committer
Tom Rini
<trini@konsulko.com>
Tue, 21 Nov 2017 01:18:36 +0000
(20:18 -0500)
sym_arr is of type struct symbol **.
So in malloc we need sizeof(struct symbol *).
The problem was indicated by coccinelle.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
scripts/kconfig/symbol.c
patch
|
blob
|
history
diff --git
a/scripts/kconfig/symbol.c
b/scripts/kconfig/symbol.c
index 20136ffefb23b814fa8b300b70a07b821b3ec71f..3c8bd9bb4267a874cd1fa112d4a21b569bd56296 100644
(file)
--- a/
scripts/kconfig/symbol.c
+++ b/
scripts/kconfig/symbol.c
@@
-1061,7
+1061,7
@@
struct symbol **sym_re_search(const char *pattern)
}
if (sym_match_arr) {
qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp);
- sym_arr = malloc((cnt+1) * sizeof(struct symbol));
+ sym_arr = malloc((cnt+1) * sizeof(struct symbol
*
));
if (!sym_arr)
goto sym_re_search_free;
for (i = 0; i < cnt; i++)