mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
(nscd_gethst_r): Avoid unnecesary read call if there are no aliases.
This commit is contained in:
parent
d11edae6f2
commit
74ac0a89d2
@ -328,8 +328,9 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
|
||||
/* And finally read the aliases. */
|
||||
if (addr_list == NULL)
|
||||
{
|
||||
if ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len)
|
||||
== total_len)
|
||||
if (total_len == 0
|
||||
|| ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len)
|
||||
== total_len))
|
||||
{
|
||||
retval = 0;
|
||||
*result = resultbuf;
|
||||
|
Loading…
Reference in New Issue
Block a user