diff options
author | Chris Hall <followingthepath@gmail.com> | 2015-05-05 22:02:18 +1200 |
---|---|---|
committer | Chris Hall <chris.hall@catalyst.net.nz> | 2015-05-08 10:08:53 +1200 |
commit | 7fc7147ad6c3ab5b1523e3014ad92d2d653bcb84 (patch) | |
tree | 5de3cb28f21da98945207fb3eca72fa507ebd4f2 | |
parent | 2393074d5f8af1983f5ce0de0b1d5567ad6ae309 (diff) | |
download | rneovim-7fc7147ad6c3ab5b1523e3014ad92d2d653bcb84.tar.gz rneovim-7fc7147ad6c3ab5b1523e3014ad92d2d653bcb84.tar.bz2 rneovim-7fc7147ad6c3ab5b1523e3014ad92d2d653bcb84.zip |
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.
-rw-r--r-- | src/nvim/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 8a98eae21f..d6b1960155 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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)) { |