(cache_addhst): One more small code simplification.
authordrepper <drepper>
Wed, 22 Aug 2007 03:11:23 +0000 (03:11 +0000)
committerdrepper <drepper>
Wed, 22 Aug 2007 03:11:23 +0000 (03:11 +0000)
nscd/hstcache.c

index 65adf31..74de8f6 100644 (file)
@@ -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)