-/* Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
*buffer = malloc (*buffer_size);
}
- while (buffer != NULL
+ while (*buffer != NULL
&& func (resbuf, *buffer, *buffer_size, &result, h_errnop) == ERANGE
&& (h_errnop == NULL || *h_errnop == NETDB_INTERNAL))
{