From 4da69ab0be7a582f57c7b57d70984fe1d950b0bb Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Fri, 24 Jul 2009 02:29:12 -0400 Subject: [PATCH] (krb5_sendto) Use IS_BAD_SOCKET() to check if the socket is bad --- lib/krb5/send_to_kdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/krb5/send_to_kdc.c b/lib/krb5/send_to_kdc.c index e8bcbcb43..54dec6c34 100644 --- a/lib/krb5/send_to_kdc.c +++ b/lib/krb5/send_to_kdc.c @@ -414,7 +414,7 @@ krb5_sendto (krb5_context context, for (a = ai; a != NULL; a = a->ai_next) { fd = socket (a->ai_family, a->ai_socktype | SOCK_CLOEXEC, a->ai_protocol); - if (fd < 0) + if (IS_BAD_SOCKET(fd)) continue; rk_cloexec(fd); if (connect (fd, a->ai_addr, a->ai_addrlen) < 0) {