getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]
commitf4a6be2582b8dfe8adfa68da3dd8decf566b3983
authorFlorian Weimer <fweimer@redhat.com>
Fri, 1 Sep 2017 07:34:29 +0000 (1 09:34 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 1 Sep 2017 07:34:29 +0000 (1 09:34 +0200)
tree76ea7e82a506bf4aed59e1492eaa1970b575bf99
parent5f8340f583fe3d4f5734bd2371c5a45ecff2db0d
getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]

The old code uses errno as the primary indicator for success or
failure.  This is wrong because errno is only set for specific
combinations of the status return value and the h_errno variable.
ChangeLog
nss/Makefile
nss/tst-nss-files-hosts-erange.c [new file with mode: 0644]
resolv/tst-resolv-basic.c
sysdeps/posix/getaddrinfo.c