mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
various files - fix some alerts raised by lgtm code analysis
This patch fixes several issues reported by the lgtm code analysis tool: https://lgtm.com/projects/g/asterisk/asterisk Not all reported issues were addressed in this patch. This patch mostly fixes confirmed reported errors, potential problematic code points, and a few other "low hanging" warnings or recommendations found in core supported modules. These include, but are not limited to the following: * innapropriate stack allocation in loops * buffer overflows * variable declaration "hiding" another variable declaration * comparisons results that are always the same * ambiguously signed bit-field members * missing header guards Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
This commit is contained in:
committed by
George Joseph
parent
990a91b44a
commit
bdd785d31c
@@ -260,11 +260,11 @@ static void unbound_resolver_callback(void *data, int err, struct ub_result *ub_
|
||||
if (!ast_dns_resolver_set_result(query, ub_result->secure, ub_result->bogus, ub_result->rcode,
|
||||
S_OR(ub_result->canonname, ast_dns_query_get_name(query)), ub_result->answer_packet, ub_result->answer_len)) {
|
||||
int i;
|
||||
char *data;
|
||||
char *result_data;
|
||||
|
||||
for (i = 0; (data = ub_result->data[i]); i++) {
|
||||
for (i = 0; (result_data = ub_result->data[i]); i++) {
|
||||
if (ast_dns_resolver_add_record(query, ub_result->qtype, ub_result->qclass, ub_result->ttl,
|
||||
data, ub_result->len[i])) {
|
||||
result_data, ub_result->len[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user