diff options
author | pfg <pfg@FreeBSD.org> | 2015-04-22 17:09:02 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-04-22 17:09:02 +0000 |
commit | 565e4b83c1e1a0daba250f6d4fad88e2b4fbdc49 (patch) | |
tree | 52ff4e04850c62e85103af0be6887508a79cc9fa /lib | |
parent | 90a59d1e9ba29619094ff1837babfb2bd29e5614 (diff) | |
download | FreeBSD-src-565e4b83c1e1a0daba250f6d4fad88e2b4fbdc49.zip FreeBSD-src-565e4b83c1e1a0daba250f6d4fad88e2b4fbdc49.tar.gz |
computematchjumps(): fix allocator sizeof operand mismatch.
Mostly cosmetical warning.
Found by: Clang static analyzer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/regex/regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 2da5066..2f2d827 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1726,13 +1726,13 @@ computematchjumps(struct parse *p, struct re_guts *g) if (p->error != 0) return; - pmatches = (int*) malloc(g->mlen * sizeof(unsigned int)); + pmatches = (int*) malloc(g->mlen * sizeof(int)); if (pmatches == NULL) { g->matchjump = NULL; return; } - g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int)); + g->matchjump = (int*) malloc(g->mlen * sizeof(int)); if (g->matchjump == NULL) { /* Not a fatal error */ free(pmatches); return; |