aboutsummaryrefslogtreecommitdiff
path: root/nscd/hstcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/hstcache.c')
-rw-r--r--nscd/hstcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 65adf318c5..74de8f6567 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -196,7 +196,7 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
/* Determine the number of addresses. */
h_addr_list_cnt = 0;
- for (cnt = 0; hst->h_addr_list[cnt]; ++cnt)
+ while (hst->h_addr_list[h_addr_list_cnt] != NULL)
++h_addr_list_cnt;
if (h_addr_list_cnt == 0)