Expect return alue to be ERANGE if buffer is too small.

This commit is contained in:
Ulrich Drepper 1999-06-17 12:41:26 +00:00
parent 9105ced87a
commit 0030f0f780
2 changed files with 6 additions and 5 deletions

View File

@ -114,12 +114,13 @@ FUNCTION_NAME (ADD_PARAMS)
}
while (buffer != NULL
&& INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
buffer_size, &result H_ERRNO_VAR) != 0
&& (INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
buffer_size, &result H_ERRNO_VAR)
== ERANGE)
#ifdef NEED_H_ERRNO
&& h_errno_tmp == NETDB_INTERNAL
#endif
&& errno == ERANGE)
)
{
char *new_buf;
buffer_size += BUFLEN;

View File

@ -85,11 +85,11 @@ GETFUNC_NAME (void)
while (buffer != NULL
&& INTERNAL (REENTRANT_GETNAME) (&resbuf, buffer, buffer_size, &result
H_ERRNO_VAR) != 0
H_ERRNO_VAR) == ERANGE
#ifdef NEED_H_ERRNO
&& h_errno == NETDB_INTERNAL
#endif
&& errno == ERANGE)
)
{
char *new_buf;
buffer_size += BUFLEN;