about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-05-16 10:10:32 -0700
committerUlrich Drepper <drepper@redhat.com>2009-05-16 10:10:32 -0700
commit95410b7ba23c44f6a038285d9c38ee84129e4cd6 (patch)
tree5f05e3720faf6b1fa3f027b34025394ea0723861 /nscd
parenta5b8b56df7ae93e156ad523e1c867f41fc1e007d (diff)
downloadglibc-95410b7ba23c44f6a038285d9c38ee84129e4cd6.tar.gz
glibc-95410b7ba23c44f6a038285d9c38ee84129e4cd6.tar.xz
glibc-95410b7ba23c44f6a038285d9c38ee84129e4cd6.zip
Fix exit condition.
The patch to bound the search in the nscd caches used a wrong exit
condition.  Fixed now.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 80ee3e1dd9..c09f00859e 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)
 	{