Check-in Number:
|
6003 | |
Date: |
2008-Jun-06 14:28:54 (local)
2008-Jun-06 12:28:54 (UTC) |
User: | rse |
Branch: | |
Comment: |
fix pattern lookup algorihtm |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/str/ChangeLog 1.56 -> 1.57
--- ChangeLog 2005/10/12 08:24:30 1.56
+++ ChangeLog 2008/06/06 12:28:54 1.57
@@ -9,6 +9,11 @@
ChangeLog
+ Changes between 0.9.12 and 0.9.13 (12-Oct-2005 to xx-Jun-2008):
+
+ *) Fixed pattern lookup algorithm in str_parse().
+ [Alexander Drozdov <dzal_mail@mtu-net.ru>
+
Changes between 0.9.11 and 0.9.12 (03-Oct-2005 to 12-Oct-2005):
*) Fixed str_parse(3): the va_list argument was incorrectly used
|
|
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;
|
|