smartdns: bump copyright to 2023, and fix some typo
This commit is contained in:
@@ -1090,7 +1090,7 @@ void art_substring_walk(const art_tree *t, const unsigned char *str, int str_len
|
||||
// Check if the expanded path matches
|
||||
if (!str_prefix_matches((art_leaf*)n, str, str_len)) {
|
||||
found = (art_leaf*)n;
|
||||
stop_search = func(found->key, found->key_len, found->key_len != (uint32_t)str_len, found->value, arg);
|
||||
func(found->key, found->key_len, found->key_len != (uint32_t)str_len, found->value, arg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
* Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
*
|
||||
* smartdns is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,7 +24,7 @@
|
||||
* find_next_and_bit. The differences are:
|
||||
* - The "invert" argument, which is XORed with each fetched word before
|
||||
* searching it for one bits.
|
||||
* - The optional "addr2", which is anded with "addr1" if present.
|
||||
* - The optional "addr2", which is addr2 with "addr1" if present.
|
||||
*/
|
||||
static inline unsigned long _find_next_bit(const unsigned long *addr1,
|
||||
const unsigned long *addr2, unsigned long nbits,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
* Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
*
|
||||
* smartdns is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018-2022 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
* Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
*
|
||||
* smartdns is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -89,7 +89,9 @@ static int _nftset_addattr(struct nlmsghdr *n, int maxlen, __u16 type, const voi
|
||||
|
||||
void *rta_data = RTA_DATA(attr);
|
||||
|
||||
memcpy(rta_data, data, alen);
|
||||
if ((data != NULL) && (alen > 0)) {
|
||||
memcpy(rta_data, data, alen);
|
||||
}
|
||||
memset((uint8_t *)rta_data + alen, 0, RTA_ALIGN(len) - len);
|
||||
|
||||
n->nlmsg_len = newlen;
|
||||
@@ -202,7 +204,6 @@ static int _nftset_socket_request(void *msg, int msg_len, void *ret_msg, int ret
|
||||
int ret = -1;
|
||||
struct pollfd pfds;
|
||||
int do_recv = 0;
|
||||
int last_errno = 0;
|
||||
int len = 0;
|
||||
|
||||
if (_nftset_socket_init() != 0) {
|
||||
@@ -260,10 +261,6 @@ static int _nftset_socket_request(void *msg, int msg_len, void *ret_msg, int ret
|
||||
break;
|
||||
}
|
||||
|
||||
if (errno == EAGAIN && last_errno != 0) {
|
||||
errno = last_errno;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -275,7 +272,6 @@ static int _nftset_socket_request(void *msg, int msg_len, void *ret_msg, int ret
|
||||
struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nlh);
|
||||
if (err->error != 0) {
|
||||
errno = -err->error;
|
||||
last_errno = errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -436,8 +436,10 @@ radix_node_t
|
||||
|
||||
node->parent = new_node;
|
||||
} else {
|
||||
if ((glue = malloc(sizeof(*glue))) == NULL)
|
||||
if ((glue = malloc(sizeof(*glue))) == NULL) {
|
||||
free(new_node);
|
||||
return (NULL);
|
||||
}
|
||||
memset(glue, '\0', sizeof(*glue));
|
||||
glue->bit = differ_bit;
|
||||
glue->prefix = NULL;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
* Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
*
|
||||
* smartdns is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
* Copyright (C) 2018-2023 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
*
|
||||
* smartdns is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
Reference in New Issue
Block a user