summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2008-07-15 17:55:59 +0000
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2008-07-15 17:55:59 +0000
commit267d69cf914b15b893fdca311fd0a22241ccb2cc (patch)
tree2ab210ed3c820d836a1315c7ed83b045a9d660c8 /tables
parent0cfc48de81b640fd96f68bfe660f7342b6a97571 (diff)
downloadlibapr-267d69cf914b15b893fdca311fd0a22241ccb2cc.tar.gz
Make sure we break when callback returns zero. Thanks Davi
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@676991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index 6f30b68fc..05ee42f46 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -498,12 +498,12 @@ APR_DECLARE(int) apr_hash_do(apr_hash_do_callback_fn_t *comp,
/* 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;
}