summaryrefslogtreecommitdiffstats
path: root/host.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-02-10 00:18:54 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-02-10 00:18:54 +0100
commitc72ecdba04e7e9c3a411daaeb6fabab85314f82a (patch)
treeb2da84878e80c7ce83fc318a2ce70ddbcf73fcfb /host.c
parent0.0.3 (diff)
downloaddnsfind-master.tar
dnsfind-master.tar.gz
dnsfind-master.tar.bz2
dnsfind-master.tar.lz
dnsfind-master.tar.xz
dnsfind-master.tar.zst
dnsfind-master.zip
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;