[v9_8] silence ccc-analyzer

3567.	[bug]		Silence clang static analyzer warnings. [RT #33365]
This commit is contained in:
Evan Hunt 2013-05-03 14:23:28 -07:00
parent 6abe3e428f
commit caa3fd00ec
4 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,5 @@
3567. [bug] Silence clang static analyzer warnings. [RT #33365]
3563. [contrib] zone2sqlite failed with some table names. [RT #33375]
3561. [bug] dig: issue a warning if an EDNS query returns FORMERR

View file

@ -526,6 +526,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;

View file

@ -5984,6 +5984,7 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep,
dns_rdataclass_t rdclass;
REQUIRE(zonep != NULL && *zonep == NULL);
REQUIRE(zonename == NULL || *zonename == NULL);
input = args;
@ -5996,7 +5997,7 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep,
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. */
@ -7657,8 +7658,8 @@ ns_server_del_zone(ns_server_t *server, char *args) {
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);

View file

@ -2235,6 +2235,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);