mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix 'Dead nested assignment's from scan-build-10
The 3 warnings reported are:
os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr'
if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
rpz.c:1117:10: warning: Although the value stored to 'zbits' is used in the enclosing expression, the value is never actually read from 'zbits'
return (zbits &= x);
^ ~
1 warning generated.
--
openssleddsa_link.c:532:10: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err'
while ((err = ERR_get_error()) != 0) {
^ ~~~~~~~~~~~~~~~
1 warning generated.
This commit is contained in:
parent
ec9f80cabc
commit
262f087bcf
3 changed files with 4 additions and 4 deletions
|
|
@ -869,7 +869,7 @@ named_os_shutdownmsg(char *command, isc_buffer_t *text) {
|
|||
pid_t pid;
|
||||
|
||||
/* Skip the command name. */
|
||||
if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
|
||||
if (strtok_r(command, " \t", &last) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -529,7 +528,7 @@ openssleddsa_isprivate(const dst_key_t *key) {
|
|||
return (true);
|
||||
}
|
||||
/* can check if first error is EC_R_INVALID_PRIVATE_KEY */
|
||||
while ((err = ERR_get_error()) != 0) {
|
||||
while (ERR_get_error() != 0) {
|
||||
/**/
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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