mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 06:37:08 +00:00
- Fix some lint type warnings.
This commit is contained in:
parent
d19d7b81ec
commit
11d077c826
@ -2,6 +2,7 @@
|
||||
- Fix to silence test for ede error output to the console from the
|
||||
test setup script.
|
||||
- Fix ede test to not use default pidfile, and use local interface.
|
||||
- Fix some lint type warnings.
|
||||
|
||||
18 May 2022: George
|
||||
- Fix typos in config_set_option for the 'num-threads' and
|
||||
|
@ -2297,7 +2297,7 @@ reuse_tcp_select_id(struct reuse_tcp* reuse, struct outside_network* outnet)
|
||||
node = rbtree_first(&reuse->tree_by_id);
|
||||
log_assert(node && node != RBTREE_NULL); /* tree not empty */
|
||||
/* see if select is before first node */
|
||||
if(select < tree_by_id_get_id(node))
|
||||
if(select < (unsigned)tree_by_id_get_id(node))
|
||||
return select;
|
||||
count += tree_by_id_get_id(node);
|
||||
/* perhaps select is between nodes */
|
||||
|
@ -1560,7 +1560,9 @@ rpz_local_encode(struct module_env* env, struct query_info* qinfo,
|
||||
}
|
||||
|
||||
static struct local_rrset*
|
||||
rpz_find_synthesized_rrset(int qtype, struct clientip_synthesized_rr* data) {
|
||||
rpz_find_synthesized_rrset(uint16_t qtype,
|
||||
struct clientip_synthesized_rr* data)
|
||||
{
|
||||
struct local_rrset* cursor = data->data;
|
||||
while( cursor != NULL) {
|
||||
struct packed_rrset_key* packed_rrset = &cursor->rrset->rk;
|
||||
|
@ -1598,12 +1598,12 @@ static int sldns_str2wire_svcparam_buf(const char* str, uint8_t* rd, size_t* rd_
|
||||
if (*val_in == '"') {
|
||||
val_in++;
|
||||
while (*val_in != '"'
|
||||
&& (unsigned)(val_out - unescaped_val + 1) < sizeof(unescaped_val)
|
||||
&& (size_t)(val_out - unescaped_val + 1) < sizeof(unescaped_val)
|
||||
&& sldns_parse_char( (uint8_t*) val_out, &val_in)) {
|
||||
val_out++;
|
||||
}
|
||||
} else {
|
||||
while ((unsigned)(val_out - unescaped_val + 1) < sizeof(unescaped_val)
|
||||
while ((size_t)(val_out - unescaped_val + 1) < sizeof(unescaped_val)
|
||||
&& sldns_parse_char( (uint8_t*) val_out, &val_in)) {
|
||||
val_out++;
|
||||
}
|
||||
|
@ -243,28 +243,28 @@ b64_test(void)
|
||||
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64_pton(p1, (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello") && strcmp(target, "hello") == 0);
|
||||
unit_assert(result == (int)strlen("hello") && strcmp(target, "hello") == 0);
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64_pton(p2, (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello>") && strcmp(target, "hello>") == 0);
|
||||
unit_assert(result == (int)strlen("hello>") && strcmp(target, "hello>") == 0);
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64_pton(p3, (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello?!") && strcmp(target, "hello?!") == 0);
|
||||
unit_assert(result == (int)strlen("hello?!") && strcmp(target, "hello?!") == 0);
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64_pton(p4, (uint8_t*)target, tarsize);
|
||||
/* when padding is used everything that is not a block of 4 will be
|
||||
* ignored */
|
||||
unit_assert(result == strlen("hel") && strcmp(target, "hel") == 0);
|
||||
unit_assert(result == (int)strlen("hel") && strcmp(target, "hel") == 0);
|
||||
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64url_pton(u1, strlen(u1), (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello") && strcmp(target, "hello") == 0);
|
||||
unit_assert(result == (int)strlen("hello") && strcmp(target, "hello") == 0);
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64url_pton(u2, strlen(u2), (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello>") && strcmp(target, "hello>") == 0);
|
||||
unit_assert(result == (int)strlen("hello>") && strcmp(target, "hello>") == 0);
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64url_pton(u3, strlen(u3), (uint8_t*)target, tarsize);
|
||||
unit_assert(result == strlen("hello+/") && strcmp(target, "hello?!") == 0);
|
||||
unit_assert(result == (int)strlen("hello+/") && strcmp(target, "hello?!") == 0);
|
||||
/* one item in block of four is not allowed */
|
||||
memset(target, 0, sizeof(target));
|
||||
result = sldns_b64url_pton(u4, strlen(u4), (uint8_t*)target, tarsize);
|
||||
|
@ -2485,7 +2485,7 @@ http_nonchunk_segment(struct comm_point* c)
|
||||
remainbufferlen = sldns_buffer_capacity(c->buffer) -
|
||||
sldns_buffer_limit(c->buffer);
|
||||
if(remainbufferlen+got_now >= c->tcp_byte_count ||
|
||||
remainbufferlen >= (c->ssl?16384:2048)) {
|
||||
remainbufferlen >= (size_t)(c->ssl?16384:2048)) {
|
||||
size_t total = sldns_buffer_limit(c->buffer);
|
||||
sldns_buffer_clear(c->buffer);
|
||||
sldns_buffer_set_position(c->buffer, total);
|
||||
|
@ -93,7 +93,7 @@ struct val_env {
|
||||
int32_t skew_max;
|
||||
|
||||
/** max number of query restarts, number of IPs to probe */
|
||||
int32_t max_restart;
|
||||
int max_restart;
|
||||
|
||||
/** TTL for bogus data; used instead of untrusted TTL from data.
|
||||
* Bogus data will not be verified more often than this interval.
|
||||
|
Loading…
Reference in New Issue
Block a user