diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-02-10 00:18:54 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-02-10 00:18:54 +0100 |
commit | c72ecdba04e7e9c3a411daaeb6fabab85314f82a (patch) | |
tree | b2da84878e80c7ce83fc318a2ce70ddbcf73fcfb /host.c | |
parent | 0.0.3 (diff) | |
download | dnsfind-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.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; |