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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to