[Midnightbsd-cvs] src [7327] trunk/lib/libfetch/common.c: fix non POSIX compliant use of libfetch.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 26 14:52:45 EDT 2015


Revision: 7327
          http://svnweb.midnightbsd.org/src/?rev=7327
Author:   laffer1
Date:     2015-09-26 14:52:44 -0400 (Sat, 26 Sep 2015)
Log Message:
-----------
fix non POSIX compliant use of libfetch.

Modified Paths:
--------------
    trunk/lib/libfetch/common.c

Modified: trunk/lib/libfetch/common.c
===================================================================
--- trunk/lib/libfetch/common.c	2015-09-26 18:49:08 UTC (rev 7326)
+++ trunk/lib/libfetch/common.c	2015-09-26 18:52:44 UTC (rev 7327)
@@ -495,7 +495,8 @@
 	hints.ai_protocol = 0;
 	hints.ai_flags = AI_NUMERICHOST;
 	/* port is not relevant for this purpose */
-	getaddrinfo(host, "443", &hints, &res);
+	if (getaddrinfo(host, "443", &hints, &res) != 0)
+		res = NULL;
 	free(host);
 	return res;
 }



More information about the Midnightbsd-cvs mailing list