From 0d4b548d1e4a08105597791fd6308d7fd70d3ddf Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 30 Nov 2014 23:19:55 +0100 Subject: 33818: fix types passed to sizeof detected by coverity as being wrong --- Src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 2b7c55f8f..a5f877191 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2299,13 +2299,13 @@ addvars(Estate state, Wordcode pc, int addflags) continue; } if (vl) { - ptr = arr = (char **) zalloc(sizeof(char **) * + ptr = arr = (char **) zalloc(sizeof(char *) * (countlinknodes(vl) + 1)); while (nonempty(vl)) *ptr++ = ztrdup((char *) ugetnode(vl)); } else - ptr = arr = (char **) zalloc(sizeof(char **)); + ptr = arr = (char **) zalloc(sizeof(char *)); *ptr = NULL; if (xtr) { -- cgit 1.4.1