Skip to content

Commit

Permalink
bugfix: fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Jan 12, 2024
1 parent 9c4b3d0 commit 79c5e0a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/dns_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static struct dns_server_group *_dns_client_get_dnsserver_group(const char *grou
goto use_default;
} else {
if (list_empty(&group->head)) {
tlog(TLOG_INFO, "group %s not exist, use default group.", group_name);
tlog(TLOG_DEBUG, "group %s not exist, use default group.", group_name);
goto use_default;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/dns_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3209,7 +3209,7 @@ static struct dns_client_rules *_dns_server_get_client_rules_by_mac(uint8_t *net

item = _dns_server_neighbor_cache_get_item(netaddr, netaddr_len);
if (_dns_server_neighbor_cache_is_valid(item) == 0) {
if (item->has_mac) {
if (item->has_mac == 0) {
return NULL;
}
group_mac = dns_server_rule_group_mac_get(item->mac);
Expand Down
3 changes: 2 additions & 1 deletion src/lib/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ static int load_conf_file(const char *file, struct config_item *items, conf_erro

line_len = 0;
is_last_line_wrap = 0;

key[0] = '\0';
value[0] = '\0';
filed_num = sscanf(line, "%63s %8191[^\r\n]s", key, value);
if (filed_num <= 0) {
continue;
Expand Down
1 change: 0 additions & 1 deletion src/tlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ static int _tlog_root_log_buffer(char *buff, int maxlen, void *userptr, const ch
if (len + 1 < maxlen - 1) {
*(buff + len) = '\0';
len++;
log_len++;
}
log_head->len = log_len;
}
Expand Down

0 comments on commit 79c5e0a

Please sign in to comment.