From 267d69cf914b15b893fdca311fd0a22241ccb2cc Mon Sep 17 00:00:00 2001 From: mturk Date: Tue, 15 Jul 2008 17:55:59 +0000 Subject: 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 --- tables/apr_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tables') 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; } -- cgit v1.2.1