diff options
Diffstat (limited to 'host.c')
-rw-r--r-- | host.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |