From 79a4de0677a4d8d5b2273c6771d7a13c34dc475c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Jan 2015 00:07:39 +0100 Subject: [PATCH] Change getaddrinfo_rarch call to be the same as the rest --- net_http.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net_http.c b/net_http.c index 53cb9eb647..f8f3888fb7 100644 --- a/net_http.c +++ b/net_http.c @@ -90,15 +90,14 @@ static int net_http_new_socket(const char * domain, int port) sprintf(portstr, "%i", port); memset(&hints, 0, sizeof(hints)); - hints.ai_family=AF_UNSPEC; - hints.ai_socktype=SOCK_STREAM; - hints.ai_flags=0; + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = 0; - getaddrinfo_rarch(domain, portstr, &hints, &addr); - if (!addr) + if (getaddrinfo_rarch(domain, portstr, &hints, &addr) < 0) return -1; - (void)i; + (void)i; fd = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);