Pārlūkot izejas kodu

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.
Rich Felker 2 gadi atpakaļ
vecāks
revīzija
f9827fc7da
1 mainītis faili ar 0 papildinājumiem un 1 dzēšanām
  1. 0 1
      src/network/gethostbyname2_r.c

+ 0 - 1
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;