From: Aki Tuomi Date: Fri, 24 Aug 2018 08:42:56 +0000 (+0300) Subject: lib-dns: Remove useless code X-Git-Tag: 2.3.4~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df17f050882e261c3622f541e925200b31ed2ca4;p=thirdparty%2Fdovecot%2Fcore.git lib-dns: Remove useless code Found by scan-build --- diff --git a/src/lib-dns/dns-lookup.c b/src/lib-dns/dns-lookup.c index a4c6108eff..70edfb16ab 100644 --- a/src/lib-dns/dns-lookup.c +++ b/src/lib-dns/dns-lookup.c @@ -354,10 +354,6 @@ dns_client_send_request(struct dns_client *client, const char *cmd, if (!client->connected) { if (dns_client_connect(client, error_r) < 0) return -1; - ret = -1; - } else { - /* already connected. if write() fails, retry connecting */ - ret = 0; } if ((ret = o_stream_send(client->conn.output, cmd, strlen(cmd))) < 0) { @@ -367,7 +363,7 @@ dns_client_send_request(struct dns_client *client, const char *cmd, dns_client_disconnect(client, "Cannot send data"); } - return 1; + return ret; } static int