From 7fc7147ad6c3ab5b1523e3014ad92d2d653bcb84 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Tue, 5 May 2015 22:02:18 +1200 Subject: 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. --- src/nvim/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- cgit