From owner-svn-src-user@FreeBSD.ORG Tue Feb 28 14:22:55 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51201106564A; Tue, 28 Feb 2012 14:22:55 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40B868FC18; Tue, 28 Feb 2012 14:22:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1SEMtDk074502; Tue, 28 Feb 2012 14:22:55 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1SEMtpV074500; Tue, 28 Feb 2012 14:22:55 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201202281422.q1SEMtpV074500@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 28 Feb 2012 14:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232252 - user/gabor/tre-integration/contrib/tre/lib X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2012 14:22:55 -0000 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;