From 0edf041e14f7f76c320323e29428456b60f8b792 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 29 Jan 2002 23:11:22 +0000 Subject: [PATCH] ..and of course I broke IPv4 net_gethostbyname() with it :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2359 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/network.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/network.c b/src/core/network.c index 2ce7910d..3904d01c 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -411,15 +411,16 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6) } } freeaddrinfo(ailist); + return count > 0 ? 0 : 1; #else hp = gethostbyname(addr); if (hp == NULL) return h_errno; ip4->family = AF_INET; memcpy(&ip4->ip, hp->h_addr, 4); -#endif - return count > 0 ? 0 : 1; + return 0; +#endif } /* Get name for host, *name should be g_free()'d unless it's NULL.