mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +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. */
|
/* And finally read the aliases. */
|
||||||
if (addr_list == NULL)
|
if (addr_list == NULL)
|
||||||
{
|
{
|
||||||
if ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len)
|
if (total_len == 0
|
||||||
== total_len)
|
|| ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len)
|
||||||
|
== total_len))
|
||||||
{
|
{
|
||||||
retval = 0;
|
retval = 0;
|
||||||
*result = resultbuf;
|
*result = resultbuf;
|
||||||
|
Loading…
Reference in New Issue
Block a user