diff options
author | Oliver Kiddle <opk@zsh.org> | 2014-11-30 23:19:55 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2014-11-30 23:19:55 +0100 |
commit | 0d4b548d1e4a08105597791fd6308d7fd70d3ddf (patch) | |
tree | 7d0922511173f14d601bf8599ce806be98ded888 /Src/utils.c | |
parent | 49d6aace41f5fe47abfaa87d25c42dbdb84dfb88 (diff) | |
download | zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.tar.gz zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.tar.xz zsh-0d4b548d1e4a08105597791fd6308d7fd70d3ddf.zip |
33818: fix types passed to sizeof detected by coverity as being wrong
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/utils.c b/Src/utils.c index 5f0c1062b..926814759 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -693,12 +693,12 @@ slashsplit(char *s) int t0; if (!*s) - return (char **) zshcalloc(sizeof(char **)); + return (char **) zshcalloc(sizeof(char *)); for (t = s, t0 = 0; *t; t++) if (*t == '/') t0++; - q = r = (char **) zalloc(sizeof(char **) * (t0 + 2)); + q = r = (char **) zalloc(sizeof(char *) * (t0 + 2)); while ((t = strchr(s, '/'))) { *q++ = ztrduppfx(s, t - s); @@ -2955,7 +2955,7 @@ colonsplit(char *s, int uniq) for (t = s, ct = 0; *t; t++) /* count number of colons */ if (*t == ':') ct++; - ptr = ret = (char **) zalloc(sizeof(char **) * (ct + 2)); + ptr = ret = (char **) zalloc(sizeof(char *) * (ct + 2)); t = s; do { |