From: Ulrich Drepper Date: Sat, 16 May 2009 17:10:32 +0000 (-0700) Subject: Fix exit condition. X-Git-Tag: fedora/glibc-2.10.1-3~4^2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=223e614dafc55a14889355e95367e216d2fd320e;p=thirdparty%2Fglibc.git Fix exit condition. The patch to bound the search in the nscd caches used a wrong exit condition. Fixed now. (cherry picked from commit 95410b7ba23c44f6a038285d9c38ee84129e4cd6) --- diff --git a/ChangeLog b/ChangeLog index 9001fb73c4f..7d551881bab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-16 Ulrich Drepper + + * nscd/nscd_helper.c (__nscd_cache_search): Fix exit condition in last + patch. + 2009-05-15 Ulrich Drepper * nscd/nscd.h: Move Definition for BLOCK_ALIGN_LOG, BLOCK_ALIGN, and diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 80ee3e1dd97..c09f00859e4 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -528,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ - if (work == trail || loop_cnt-- > 0) + if (work == trail || loop_cnt-- == 0) break; if (tick) {