(nscd_gethst_r): Avoid unnecesary read call if there are no aliases.

This commit is contained in:
Ulrich Drepper 2005-11-19 17:09:03 +00:00
parent d11edae6f2
commit 74ac0a89d2

View File

@ -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;