]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence warnings about unnecessary comparisons
authorEvan Hunt <each@isc.org>
Tue, 20 Mar 2018 09:22:57 +0000 (09:22 +0000)
committerEvan Hunt <each@isc.org>
Fri, 20 Apr 2018 23:51:00 +0000 (19:51 -0400)
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary

lib/dns/master.c

index 80068dfa8358aae707896d8ac0bdcf154d060b4d..f7b7f1b6dbbd96edc4ea2350533d2723c7f480f3 100644 (file)
@@ -9,8 +9,6 @@
  * information regarding copyright ownership.
  */
 
-/* $Id$ */
-
 /*! \file */
 
 #include <config.h>
@@ -1340,8 +1338,9 @@ load_text(dns_loadctx_t *lctx) {
                                        if (MANYERRS(lctx, result)) {
                                                SETRESULT(lctx, result);
                                                lctx->ttl = 0;
-                                       } else if (result != ISC_R_SUCCESS)
+                                       } else {
                                                goto insist_and_cleanup;
+                                       }
                                } else if (!explicit_ttl &&
                                           lctx->default_ttl_known) {
                                        lctx->ttl = lctx->default_ttl;
@@ -1372,8 +1371,9 @@ load_text(dns_loadctx_t *lctx) {
                                result = DNS_R_SYNTAX;
                                if (MANYERRS(lctx, result)) {
                                        SETRESULT(lctx, result);
-                               } else if (result != ISC_R_SUCCESS)
+                               } else {
                                        goto insist_and_cleanup;
+                               }
                        }
 
                        /*
@@ -1544,8 +1544,9 @@ load_text(dns_loadctx_t *lctx) {
                                SETRESULT(lctx, result);
                                LOGIT(result);
                                continue;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else {
                                goto insist_and_cleanup;
+                       }
                }
 
                /*
@@ -1584,8 +1585,9 @@ load_text(dns_loadctx_t *lctx) {
                                        SETRESULT(lctx, result);
                                        read_till_eol = ISC_TRUE;
                                        continue;
-                               } else if (result != ISC_R_SUCCESS)
+                               } else {
                                        goto insist_and_cleanup;
+                               }
                        }
 
                        if (ictx->origin_changed) {
@@ -1628,8 +1630,9 @@ load_text(dns_loadctx_t *lctx) {
                                SETRESULT(lctx, result);
                                read_till_eol = ISC_TRUE;
                                continue;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else {
                                goto insist_and_cleanup;
+                       }
                }
 
                if (rdclass == 0 &&
@@ -1646,8 +1649,9 @@ load_text(dns_loadctx_t *lctx) {
                                SETRESULT(lctx, result);
                                read_till_eol = ISC_TRUE;
                                continue;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else {
                                goto insist_and_cleanup;
+                       }
                }
 
                result = dns_rdatatype_fromtext(&type,
@@ -1687,8 +1691,9 @@ load_text(dns_loadctx_t *lctx) {
                                SETRESULT(lctx, result);
                                read_till_eol = ISC_TRUE;
                                continue;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else {
                                goto insist_and_cleanup;
+                       }
                }
 
                if (type == dns_rdatatype_ns && ictx->glue == NULL)
@@ -1800,8 +1805,9 @@ load_text(dns_loadctx_t *lctx) {
                                                            namebuf, desc);
                                        if (MANYERRS(lctx, result)) {
                                                SETRESULT(lctx, result);
-                                       } else if (result != ISC_R_SUCCESS)
+                                       } else {
                                                goto cleanup;
+                                       }
                                } else {
                                        (*callbacks->warn)(callbacks,
                                                           "%s:%lu: %s: %s",
@@ -1852,8 +1858,9 @@ load_text(dns_loadctx_t *lctx) {
                                read_till_eol = ISC_TRUE;
                                target = target_ft;
                                continue;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else {
                                goto insist_and_cleanup;
+                       }
                }
 
                if (type == dns_rdatatype_rrsig ||