Skip to content
Snippets Groups Projects
Commit fdccc39b authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

scan-build: remove dead initialization and increments

parent f70c2a98
No related branches found
No related tags found
No related merge requests found
......@@ -565,7 +565,6 @@ static int remote_send_chunk(int c, knot_packet_t *pkt, const char* d,
}
knot_wire_set_nscount(rwire, rr_count);
len += rrlen;
rlen -= rrlen;
knot_rrset_deep_free(&rr, 1);
if (len > 0) {
......@@ -860,7 +859,6 @@ int remote_create_txt(knot_rrset_t *rr, const char *v, size_t v_len)
if (r > 0) {
*(raw++) = (uint8_t)r;
memcpy(raw, v+p, r);
raw += K;
}
return KNOT_EOK;
......
......@@ -168,11 +168,10 @@ static void log_error_from_node(err_handler_t *handler,
offset += snprintf(buffer + offset, 1024 - offset,
"%s", error_messages[-error]);
if (data == NULL) {
offset += snprintf(buffer + offset,
1024 - offset, "\n");
snprintf(buffer + offset, 1024 - offset, "\n");
} else {
offset += snprintf(buffer + offset,
1024 - offset, " %s\n", data);
snprintf(buffer + offset, 1024 - offset,
" %s\n", data);
}
log_zone_warning("%s", buffer);
} else {
......
......@@ -150,11 +150,6 @@ int knot_query_add_rrset_authority(knot_packet_t *query,
uint8_t *endp = query->wireformat + query->max_size;
assert(endp - startp > query->opt_rr.size + query->tsig_size);
// reserve space for OPT RR
/*! \todo Why here??? */
endp -= query->opt_rr.size;
/* Reserve space for TSIG RR */
endp -= query->tsig_size;
size_t written = 0;
uint16_t rr_count = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment