Commit d76e1724 authored by Mark Andrews's avatar Mark Andrews

Merge branch '877-clang-scan-build-redundant-assignments-detected' into 'master'

Remove redundant assignments

Closes #877

See merge request !1513
parents a92d281e f475dc75
Pipeline #10171 passed with stages
in 1 minute and 9 seconds
......@@ -901,7 +901,7 @@ parse_args(int argc, char **argv) {
bool have_lookup = false;
usesearch = true;
for (argc--, argv++; argc > 0; argc--, argv++) {
for (argc--, argv++; argc > 0 && argv[0] != NULL; argc--, argv++) {
debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') {
if (strncasecmp(argv[0], "-ver", 4) == 0) {
......
......@@ -14712,7 +14712,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
CHECK(ISC_R_NOTFOUND);
}
CHECK(putnull(text));
(void) putnull(text);
cleanup:
if (msg != NULL) {
......
......@@ -837,8 +837,9 @@ dns_catz_zone_detach(dns_catz_zone_t **zonep) {
void
dns_catz_catzs_detach(dns_catz_zones_t **catzsp) {
dns_catz_zones_t *catzs;
REQUIRE(catzsp != NULL && *catzsp != NULL);
dns_catz_zones_t *catzs = *catzsp;
catzs = *catzsp;
*catzsp = NULL;
......
......@@ -487,7 +487,6 @@ dst_gssapi_identitymatchesrealmms(const dns_name_t *signer,
*/
rname++;
*sname = '\0';
sname = sbuf;
if (strcmp(rname, rbuf) != 0) {
return (false);
......
......@@ -6946,8 +6946,7 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_buffer_t buffer;
unsigned char data[1024];
bool seen_soa, seen_ns, seen_rr, seen_dname, seen_nsec,
seen_nsec3, seen_ds;
bool seen_soa, seen_ns, seen_rr, seen_nsec, seen_nsec3, seen_ds;
result = dns_db_allrdatasets(db, node, version, 0, &iterator);
if (result != ISC_R_SUCCESS) {
......@@ -6958,8 +6957,7 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
dns_rdataset_init(&rdataset);
isc_buffer_init(&buffer, data, sizeof(data));
seen_rr = seen_soa = seen_ns = seen_dname = seen_nsec =
seen_nsec3 = seen_ds = false;
seen_rr = seen_soa = seen_ns = seen_nsec = seen_nsec3 = seen_ds = false;
for (result = dns_rdatasetiter_first(iterator);
result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(iterator)) {
......@@ -6970,8 +6968,6 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
seen_ns = true;
else if (rdataset.type == dns_rdatatype_ds)
seen_ds = true;
else if (rdataset.type == dns_rdatatype_dname)
seen_dname = true;
else if (rdataset.type == dns_rdatatype_nsec)
seen_nsec = true;
else if (rdataset.type == dns_rdatatype_nsec3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment