From 751769b49d7d09b21a563e3090132a7c58c4b9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 7 Aug 2016 16:17:42 +0200 Subject: 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. --- src/plugins/irc/irc-server.c | 4 ++-- src/plugins/xfer/xfer.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 20e40f02f..aa09d47c9 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -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) diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 7730fdf36..cef7a23e2 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -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) { -- cgit v1.2.3