svn commit: r232252 - user/gabor/tre-integration/contrib/tre/lib
Gabor Kovesdan
gabor at FreeBSD.org
Tue Feb 28 14:22:55 UTC 2012
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;
More information about the svn-src-user
mailing list