summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-09-19 19:09:02 -0400
committerRich Felker <dalias@aerifal.cx>2022-09-19 19:09:02 -0400
commitf9827fc7da55c7b03ea5f36598ce8782c03e9d6e (patch)
treeb756b3e231836f2e8008c95fcdd251141d2f4173
parentf081d5336a80b68d3e1bed789cc373c5c3d6699b (diff)
downloadmusl-f9827fc7da55c7b03ea5f36598ce8782c03e9d6e.tar.gz
musl-f9827fc7da55c7b03ea5f36598ce8782c03e9d6e.tar.bz2
musl-f9827fc7da55c7b03ea5f36598ce8782c03e9d6e.tar.xz
musl-f9827fc7da55c7b03ea5f36598ce8782c03e9d6e.zip
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.
-rw-r--r--src/network/gethostbyname2_r.c1
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;