Date: Wed, 22 Apr 2015 17:09:03 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281858 - head/lib/libc/regex Message-ID: <201504221709.t3MH93vD054506@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Apr 22 17:09:02 2015 New Revision: 281858 URL: https://svnweb.freebsd.org/changeset/base/281858 Log: computematchjumps(): fix allocator sizeof operand mismatch. Mostly cosmetical warning. Found by: Clang static analyzer Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Wed Apr 22 16:51:21 2015 (r281857) +++ head/lib/libc/regex/regcomp.c Wed Apr 22 17:09:02 2015 (r281858) @@ -1726,13 +1726,13 @@ computematchjumps(struct parse *p, struc 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504221709.t3MH93vD054506>