From f9827fc7da55c7b03ea5f36598ce8782c03e9d6e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 19 Sep 2022 19:09:02 -0400 Subject: 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. --- src/network/gethostbyname2_r.c | 1 - 1 file changed, 1 deletion(-) 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; -- cgit 1.4.1