summaryrefslogtreecommitdiffstats
path: root/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'host.c')
-rw-r--r--host.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/host.c b/host.c
index 9fc2cad..7012876 100644
--- a/host.c
+++ b/host.c
@@ -47,6 +47,8 @@ int resolve (const char * d, uint32_t * r) {
};
struct addrinfo * result;
int ret = getaddrinfo(d, NULL, &hints, &result);
+ if (ret)
+ return ret;
*r = ((struct sockaddr_in *) result->ai_addr)->sin_addr.s_addr; /* ah yes, C */
freeaddrinfo(result);
return ret;