diff --git a/resolv/tst-resolv-trailing.c b/resolv/tst-resolv-trailing.c index c42e2a34d6..ce141759ad 100644 --- a/resolv/tst-resolv-trailing.c +++ b/resolv/tst-resolv-trailing.c @@ -114,7 +114,7 @@ do_test (void) AI_V4MAPPED, AI_V4MAPPED | AI_NUMERICHOST, }; - for (size_t gai_flags_idx; gai_flags_idx < array_length (gai_flags); + for (size_t gai_flags_idx = 0; gai_flags_idx < array_length (gai_flags); ++gai_flags_idx) { struct addrinfo hints = { .ai_flags = gai_flags[gai_flags_idx], };