1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: irc, xfer: do not check return code of res_init()

If the call to res_init() fails, the connection may be OK anyway
or in worst case it will fail (with an appropriate error) if the name
can not be resolved.
This commit is contained in:
Sébastien Helleu
2016-08-07 16:17:42 +02:00
parent f695a79d9b
commit 751769b49d
3 changed files with 7 additions and 10 deletions
+2 -2
View File
@@ -5134,8 +5134,8 @@ irc_server_xfer_send_ready_cb (const void *pointer, void *data,
"local_address");
if (local_address)
{
if ((rc = res_init()) == 0)
rc = getaddrinfo (local_address, NULL, NULL, &ainfo);
res_init ();
rc = getaddrinfo (local_address, NULL, NULL, &ainfo);
if ((rc == 0) && ainfo && ainfo->ai_addr)
{
if (ainfo->ai_family == AF_INET)
+1 -2
View File
@@ -968,8 +968,7 @@ xfer_resolve_addr (const char *str_address, const char *str_port,
hints.ai_addr = NULL;
hints.ai_next = NULL;
if (res_init() != 0)
return 0;
res_init ();
rc = getaddrinfo (str_address, str_port, &hints, &ainfo);
if ((rc == 0) && ainfo && ainfo->ai_addr)
{