krb5: Quiet warning in socket_free()
authorNicolas Williams <nico@twosigma.com>
Wed, 4 Jan 2023 22:17:30 +0000 (16:17 -0600)
committerNicolas Williams <nico@twosigma.com>
Wed, 4 Jan 2023 22:17:30 +0000 (16:17 -0600)
lib/krb5/store_sock.c

index af1d687b912e1fdf7f40117e90e9c59fe783be52..72d3e9d22bd22d6dc8ec990ea394fb65d698635c 100644 (file)
@@ -82,10 +82,13 @@ static void
 socket_free(krb5_storage * sp)
 {
     int save_errno = errno;
-    if (rk_IS_SOCKET_ERROR(rk_closesocket(SOCK(sp))))
+    if (rk_IS_SOCKET_ERROR(rk_closesocket(SOCK(sp)))) {
+#ifdef WIN32
         errno = rk_SOCK_ERRNO;
-    else
+#endif
+    } else {
         errno = save_errno;
+    }
 }
 
 /**