]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] silence ccc-analyzer
authorEvan Hunt <each@isc.org>
Fri, 3 May 2013 21:22:47 +0000 (14:22 -0700)
committerEvan Hunt <each@isc.org>
Fri, 3 May 2013 21:31:27 +0000 (14:31 -0700)
3567. [bug] Silence clang static analyzer warnings. [RT #33365]

CHANGES
bin/dnssec/dnssec-keygen.c
bin/named/server.c
lib/dns/zone.c
lib/isc/unix/app.c

diff --git a/CHANGES b/CHANGES
index c1a5d04cc9f4f03488881d4497e2174f8848eb10..8920efbb610d892623e7e32da018d1a902c7229b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3567.  [bug]           Silence clang static analyzer warnings. [RT #33365]
+
 3566.  [func]          Log when forwarding updates to master. [RT #33240]
 
 3564.  [bug]           Improved handling of corrupted map files. [RT #33380]
index 5a30ca55b7416e4a03e3e28f53f141e98e5a2431..1e61ca392e8600a7b4ef0e0c8f47f132bbfb68f1 100644 (file)
@@ -535,6 +535,7 @@ main(int argc, char **argv) {
                                        "recommended.\nIf you still wish to "
                                        "use RSA (RSAMD5) please specify "
                                        "\"-a RSAMD5\"\n");
+                       INSIST(freeit == NULL);
                        return (1);
                } else if (strcasecmp(algname, "HMAC-MD5") == 0)
                        alg = DST_ALG_HMACMD5;
index 766602e647286042c131f25b44ef8590b23490fc..b6c1d7aadef2cd6f13395e21fb616f2a192690a7 100644 (file)
@@ -6605,6 +6605,7 @@ zone_from_args(ns_server_t *server, char *args, const char *zonetxt,
        dns_rdataclass_t rdclass;
 
        REQUIRE(zonep != NULL && *zonep == NULL);
+       REQUIRE(zonename == NULL || *zonename == NULL);
 
        input = args;
 
@@ -6620,7 +6621,7 @@ zone_from_args(ns_server_t *server, char *args, const char *zonetxt,
                zonetxt = next_token(&input, " \t");
        if (zonetxt == NULL)
                return (ISC_R_SUCCESS);
-       if (zonename)
+       if (zonename != NULL)
                *zonename = zonetxt;
 
        /* Look for the optional class name. */
@@ -8510,8 +8511,8 @@ ns_server_del_zone(ns_server_t *server, char *args, isc_buffer_t *text) {
                goto cleanup;
        }
 
-       if (zonename != NULL)
-               znamelen = strlen(zonename);
+       INSIST(zonename != NULL);
+       znamelen = strlen(zonename);
 
        /* Dig out configuration for this zone */
        view = dns_zone_getview(zone);
index 2dd147e17d5e6b0bdca0e72753059758585f3aa3..889e6e4b8cb841c2c105feceb0b559b3da2c87cf 100644 (file)
@@ -2628,6 +2628,10 @@ isspf(const dns_rdata_t *rdata) {
                data += tl;
                rdl -= tl;
        }
+
+       if (i < 6U)
+               return(ISC_FALSE);
+
        buf[i] = 0;
        if (strncmp(buf, "v=spf1", 6) == 0 && (buf[6] == 0 || buf[6] == ' '))
                return (ISC_TRUE);
index e9fce14e8cc573c2e1c7ccb838506777b9153cf5..f4a121489ec8e934253a73110142954da327b9d9 100644 (file)
@@ -375,10 +375,10 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
  cleanup:
 #ifdef ISC_PLATFORM_USETHREADS
  cleanup_rcond:
-       isc_condition_destroy(&ctx->ready);
+       (void)isc_condition_destroy(&ctx->ready);
 
  cleanup_rlock:
-       isc_mutex_destroy(&ctx->readylock);
+       (void)isc_mutex_destroy(&ctx->readylock);
 #endif /* ISC_PLATFORM_USETHREADS */
        return (result);
 }