mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-02 16:03:45 +00:00
Polish code
code issues found by Clang with CFLAGS="-Os -Wall -Wextra -Werror=unused-const-variable -Wno-error=unused-parameter" enabled The details as follows: - variable initialization issue, modified them as Clang suggested - data type mismatch when comparing, fix them either by casting or changing the data type of index of iterator - get_sockaddr() in netutils may return -1 thus changed returning type from size_t to ssize_t, which makes Clang happier - recvfrom() in udprelay is identical, fix this by creating local variable for comparison and assign back to buf->len when returning value is acceptable Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
@@ -541,7 +541,8 @@ ipset_node_cache_save_dot(struct cork_stream_consumer *stream,
|
||||
struct ipset_node_cache *cache, ipset_node_id node)
|
||||
{
|
||||
struct dot_data dot_data = {
|
||||
0 /* default value */
|
||||
0, /* default value */
|
||||
{NULL, 0, 0}
|
||||
};
|
||||
|
||||
struct save_data save_data;
|
||||
|
||||
Reference in New Issue
Block a user