diff options
author | Rich Felker <dalias@aerifal.cx> | 2022-09-19 19:09:02 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2022-09-19 19:09:02 -0400 |
commit | f9827fc7da55c7b03ea5f36598ce8782c03e9d6e (patch) | |
tree | b756b3e231836f2e8008c95fcdd251141d2f4173 /src | |
parent | f081d5336a80b68d3e1bed789cc373c5c3d6699b (diff) | |
download | musl-f9827fc7da55c7b03ea5f36598ce8782c03e9d6e.tar.gz |
remove impossible error case from gethostbyname2_r
EAI_MEMORY is not possible because the resolver backend does not
allocate. if it did, it would be necessary for us to explicitly return
ENOMEM as the error, since errno is not guaranteed to reflect the
error cause except in the case of EAI_SYSTEM, so the existing code was
not correct anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/gethostbyname2_r.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/network/gethostbyname2_r.c b/src/network/gethostbyname2_r.c index f012ec2f..c9f3acc4 100644 --- a/src/network/gethostbyname2_r.c +++ b/src/network/gethostbyname2_r.c @@ -30,7 +30,6 @@ int gethostbyname2_r(const char *name, int af, case EAI_FAIL: *err = NO_RECOVERY; return EBADMSG; - case EAI_MEMORY: case EAI_SYSTEM: *err = NO_RECOVERY; return errno; |