mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Merge branch 'ondrej/scan-build-10-fixes-v9_11-v9_14' into 'v9_14'
Fix new warnings reported by scan-build from LLVM/Clang 10 (v9.14) See merge request isc-projects/bind9!3290
This commit is contained in:
commit
fc1bd06eac
4 changed files with 9 additions and 4 deletions
|
|
@ -249,6 +249,8 @@ get_addresses(const char *host, in_port_t port) {
|
|||
isc_result_t result;
|
||||
int found = 0, count;
|
||||
|
||||
REQUIRE(host != NULL);
|
||||
|
||||
if (*host == '/') {
|
||||
result = isc_sockaddr_frompath(&serveraddrs[nserveraddrs],
|
||||
host);
|
||||
|
|
@ -990,8 +992,9 @@ main(int argc, char **argv) {
|
|||
if (strcmp(command, "restart") == 0)
|
||||
fatal("'%s' is not implemented", command);
|
||||
|
||||
if (nserveraddrs == 0)
|
||||
if (nserveraddrs == 0 && servername != NULL) {
|
||||
get_addresses(servername, (in_port_t) remoteport);
|
||||
}
|
||||
|
||||
DO("post event", isc_app_onrun(rndc_mctx, task, rndc_start, NULL));
|
||||
|
||||
|
|
|
|||
|
|
@ -312,6 +312,7 @@ main(int argc, char *argv[]) {
|
|||
isc_sockaddr_fromin(&sa, &ina, 53);
|
||||
ISC_LIST_APPEND(sal, &sa, link);
|
||||
|
||||
REQUIRE(DNS_VIEW_VALID(view));
|
||||
RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
|
||||
&sal, dns_fwdpolicy_only)
|
||||
== ISC_R_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -518,7 +518,6 @@ static bool
|
|||
openssleddsa_isprivate(const dst_key_t *key) {
|
||||
EVP_PKEY *pkey = key->keydata.pkey;
|
||||
int len;
|
||||
unsigned long err;
|
||||
|
||||
if (pkey == NULL)
|
||||
return (false);
|
||||
|
|
@ -527,8 +526,9 @@ openssleddsa_isprivate(const dst_key_t *key) {
|
|||
if (len > 0)
|
||||
return (true);
|
||||
/* can check if first error is EC_R_INVALID_PRIVATE_KEY */
|
||||
while ((err = ERR_get_error()) != 0)
|
||||
while (ERR_get_error() != 0) {
|
||||
/**/;
|
||||
}
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1114,7 +1114,8 @@ trim_zbits(dns_rpz_zbits_t zbits, dns_rpz_zbits_t found) {
|
|||
x = zbits & found;
|
||||
x &= (~x + 1);
|
||||
x = (x << 1) - 1;
|
||||
return (zbits &= x);
|
||||
zbits &= x;
|
||||
return (zbits);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue