[BACK]Return to engine.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / regex

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/regex/engine.c between version 1.22 and 1.23

version 1.22, 2009/02/12 05:06:54 version 1.23, 2011/10/09 18:23:00
Line 212  matcher(
Line 212  matcher(
         /* prescreening; this does wonders for this rather slow code */          /* prescreening; this does wonders for this rather slow code */
         if (g->must != NULL) {          if (g->must != NULL) {
                 for (dp = start; dp < stop; dp++)                  for (dp = start; dp < stop; dp++)
                         if (*dp == g->must[0] && stop - dp >= g->mlen &&                          if (*dp == g->must[0] && (size_t)(stop - dp) >= g->mlen &&
                                 memcmp(dp, g->must, (size_t)g->mlen) == 0)                                  memcmp(dp, g->must, g->mlen) == 0)
                                 break;                                  break;
                 if (dp == stop)         /* we didn't find g->must */                  if (dp == stop)         /* we didn't find g->must */
                         return(REG_NOMATCH);                          return(REG_NOMATCH);

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

CVSweb <webmaster@jp.NetBSD.org>