]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: dns: Removing usless variable & assignation
authorErwan Velu <erwanaliasr1@gmail.com>
Thu, 15 Oct 2015 13:07:26 +0000 (15:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Aug 2016 12:24:48 +0000 (14:24 +0200)
In dns_send_query(), ret was set to 0 but always reassigned before the
usage so this initialisation was useless.

The send_error variable was created, assigned to 0 but never used. So
this variable is just useless by itself. Removing it.

src/dns.c

index 7f4c59ad972b3cd9a8eaedfe1b727c3d69424243..c76637f870d17eaa41cdae4a1da1bd13a6069be5 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -280,11 +280,10 @@ int dns_send_query(struct dns_resolution *resolution)
 {
        struct dns_resolvers *resolvers;
        struct dns_nameserver *nameserver;
-       int ret, send_error, bufsize, fd;
+       int ret, bufsize, fd;
 
        resolvers = resolution->resolvers;
 
-       ret = send_error = 0;
        bufsize = dns_build_query(resolution->query_id, resolution->query_type, resolution->hostname_dn,
                        resolution->hostname_dn_len, trash.str, trash.size);