OSSP CVS Repository

ossp - Difference in ossp-pkg/str/str_parse.c versions 1.22 and 1.23
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/str/str_parse.c 1.22 -> 1.23

--- str_parse.c  2005/10/12 08:24:30     1.22
+++ str_parse.c  2008/06/06 12:28:54     1.23
@@ -193,14 +193,15 @@
     *p_pcre_extra = NULL;
 
     h = hash_func(key, keylen);
-    if ((he = pattern_hash[h]) == NULL)
-        return;
-    while (he->next != NULL) {
+    he = pattern_hash[h];
+    while (he != NULL) {
         if (he->keylen == keylen)
             if (memcmp(he->key, key, keylen))
                 break;
         he = he->next;
     }
+    if (he == NULL)
+        return;
     *p_pcre = he->p_pcre;
     *p_pcre_extra = he->p_pcre_extra;
     return;

CVSTrac 2.0.1