]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove dead code, result cannot be ISC_R_SUSPEND
authorMark Andrews <marka@isc.org>
Fri, 29 Apr 2022 02:25:25 +0000 (12:25 +1000)
committerMark Andrews <marka@isc.org>
Fri, 29 Apr 2022 02:25:25 +0000 (12:25 +1000)
    *** CID 351290:  Control flow issues  (DEADCODE)
    /lib/dns/client.c: 1027 in dns_client_resolve()
    1021      if (!client->readydone) {
    1022      WAIT(&client->ready, &client->readylock);
    1023      }
    1024      UNLOCK(&client->readylock);
    1025
    1026      LOCK(&resarg->lock);
    >>>     CID 351290:  Control flow issues  (DEADCODE)
    >>>     Execution cannot reach the expression "result == ISC_R_SUSPEND" inside this statement: "if (result == ISC_R_SUCCESS...".
    1027      if (result == ISC_R_SUCCESS || result == ISC_R_SUSPEND) {
    1028      result = resarg->result;
    1029      }
    1030      if (result != ISC_R_SUCCESS && resarg->vresult != ISC_R_SUCCESS) {
    1031      /*
    1032       * If this lookup failed due to some error in DNSSEC

lib/dns/client.c

index 412d708ea44f00ba894b1b347a1199f62a6186f1..22145a827c686eff4f78bcca99dc8e6e1c72abbe 100644 (file)
@@ -1024,7 +1024,7 @@ dns_client_resolve(dns_client_t *client, const dns_name_t *name,
        UNLOCK(&client->readylock);
 
        LOCK(&resarg->lock);
-       if (result == ISC_R_SUCCESS || result == ISC_R_SUSPEND) {
+       if (result == ISC_R_SUCCESS) {
                result = resarg->result;
        }
        if (result != ISC_R_SUCCESS && resarg->vresult != ISC_R_SUCCESS) {