apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r676991 - /apr/apr/trunk/tables/apr_hash.c
Date Tue, 15 Jul 2008 17:55:59 GMT
Author: mturk
Date: Tue Jul 15 10:55:59 2008
New Revision: 676991

URL: http://svn.apache.org/viewvc?rev=676991&view=rev
Log:
Make sure we break when callback returns zero. Thanks Davi

Modified:
    apr/apr/trunk/tables/apr_hash.c

Modified: apr/apr/trunk/tables/apr_hash.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/tables/apr_hash.c?rev=676991&r1=676990&r2=676991&view=diff
==============================================================================
--- apr/apr/trunk/tables/apr_hash.c (original)
+++ apr/apr/trunk/tables/apr_hash.c Tue Jul 15 10:55:59 2008
@@ -498,12 +498,12 @@
         /* Scan the entire table */
         do {
             rv = (*comp)(rec, hi->this->key, hi->this->klen, hi->this->val);
-        } while ((hi = apr_hash_next(hi)));
+        } while (rv && (hi = apr_hash_next(hi)));
 
         if (rv == 0) {
             dorv = 0;
         }
-    }   
+    }
     return dorv;
 }
 



Mime
View raw message