summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/tests/nss/gethostby_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/tests/nss/gethostby_test.c b/lib/libc/tests/nss/gethostby_test.c
index bdeafbc..618f747 100644
--- a/lib/libc/tests/nss/gethostby_test.c
+++ b/lib/libc/tests/nss/gethostby_test.c
@@ -893,7 +893,7 @@ hostent_test_getnameinfo_eq(struct hostent *he, void *mdata)
printf("matched official hostname\n");
#endif
} else {
- for (i = 0; i < nitems(result->h_aliases); i++) {
+ for (i = 0; result->h_aliases[i] != NULL; i++) {
printf("[%d] resolved: %s\n", i,
result->h_aliases[i]);
if (strcmp(result->h_aliases[i],
OpenPOWER on IntegriCloud