mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
coverity/62618: fixing "Wrong sizeof argument"
suspicious_sizeof: Passing argument 168UL /* sizeof (ufunc_T) */ * todo to function xmalloc and then casting the return value to ufunc_T ** is suspicious.
This commit is contained in:
@@ -18575,7 +18575,7 @@ void func_dump_profile(FILE *fd)
|
||||
if (todo == 0)
|
||||
return; /* nothing to dump */
|
||||
|
||||
sorttab = xmalloc(sizeof(ufunc_T) * todo);
|
||||
sorttab = xmalloc(sizeof(ufunc_T *) * todo);
|
||||
|
||||
for (hi = func_hashtab.ht_array; todo > 0; ++hi) {
|
||||
if (!HASHITEM_EMPTY(hi)) {
|
||||
|
Reference in New Issue
Block a user