Date: Tue, 28 Feb 2012 14:22:55 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r232252 - user/gabor/tre-integration/contrib/tre/lib Message-ID: <201202281422.q1SEMtpV074500@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gabor Date: Tue Feb 28 14:22:54 2012 New Revision: 232252 URL: http://svn.freebsd.org/changeset/base/232252 Log: - Fix return when match found - Remove a superfluous else - Initialize pointers with NULL Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Tue Feb 28 13:28:50 2012 (r232251) +++ user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Tue Feb 28 14:22:54 2012 (r232252) @@ -266,9 +266,9 @@ fail: pmatch->rm_so = beg; \ pmatch->rm_eo = end; \ pmatch->p = idx; \ - ret = REG_OK; \ - goto finish; \ } \ + ret = REG_OK; \ + goto finish; \ } while (0); #define _WMSEARCH(data, pats, sizes, mlen, tbl, dshift) \ @@ -305,8 +305,6 @@ fail: idx); \ } \ } \ - else \ - continue; \ pos += 1; \ } \ } \ @@ -326,7 +324,7 @@ tre_wmexec(const wmsearch_t *wm, const v tre_str_type_t type, size_t nmatch, regmatch_t pmatch[], int eflags) { - wmentry_t *s_entry, *p_entry; + wmentry_t *s_entry = NULL, *p_entry = NULL; const tre_char_t *wide_str = str; const char *byte_str = str; size_t pos = (type == STR_WIDE) ? wm->wm : wm->m;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202281422.q1SEMtpV074500>