grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.20-4-g709e7e5


From: Paul Eggert
Subject: grep branch, master, updated. v2.20-4-g709e7e5
Date: Thu, 05 Jun 2014 16:46:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  709e7e5d54dbdc83e3290b8c5adc79b36c71886c (commit)
      from  b342369b8f6d0bee5f7eda04e63b694dbccc912a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=709e7e5d54dbdc83e3290b8c5adc79b36c71886c


commit 709e7e5d54dbdc83e3290b8c5adc79b36c71886c
Author: Paul Eggert <address@hidden>
Date:   Thu Jun 5 09:45:52 2014 -0700

    grep: undo part of previous change
    
    * src/dfa.c (enlist): Undo part of previous change that doesn't
    look correct and doesn't help performance much anyway.

diff --git a/src/dfa.c b/src/dfa.c
index 33319dd..522a027 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3763,12 +3763,15 @@ static char **
 enlist (char **cpp, char *new, size_t len)
 {
   size_t i, j;
+  new = memcpy (xmalloc (len + 1), new, len);
+  new[len] = '\0';
   /* Is there already something in the list that's new (or longer)?  */
   for (i = 0; cpp[i] != NULL; ++i)
     if (strstr (cpp[i], new) != NULL)
-      return cpp;
-  new = memcpy (xmalloc (len + 1), new, len);
-  new[len] = '\0';
+      {
+        free (new);
+        return cpp;
+      }
   /* Eliminate any obsoleted strings.  */
   j = 0;
   while (cpp[j] != NULL)

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]