]> granicus.if.org Git - libevent/commitdiff
remove redundant DNS_ERR_CANCEL check, move comment
authorGreg Hazel <ghazel@gmail.com>
Thu, 19 Apr 2012 04:41:48 +0000 (21:41 -0700)
committerGreg Hazel <ghazel@gmail.com>
Thu, 19 Apr 2012 04:41:48 +0000 (21:41 -0700)
evdns.c

diff --git a/evdns.c b/evdns.c
index ba010d46f96449738288aa024086fa3d4214c8b1..5db462485c08f940209a7410b8b9b3706e5f2245 100644 (file)
--- a/evdns.c
+++ b/evdns.c
@@ -2251,16 +2251,15 @@ nameserver_probe_callback(int result, char type, int count, int ttl, void *addre
        (void) addresses;
 
        if (result == DNS_ERR_CANCEL) {
+               /* We canceled this request because the nameserver came up
+                * for some other reason.  Do not change our opinion about
+                * the nameserver. */
                return;
        }
 
        EVDNS_LOCK(ns->base);
        ns->probe_request = NULL;
-       if (result == DNS_ERR_CANCEL) {
-               /* We canceled this request because the nameserver came up
-                * for some other reason.  Do not change our opinion about
-                * the nameserver. */
-       } else if (result == DNS_ERR_NONE || result == DNS_ERR_NOTEXIST) {
+       if (result == DNS_ERR_NONE || result == DNS_ERR_NOTEXIST) {
                /* this is a good reply */
                nameserver_up(ns);
        } else {