diff options
| author | 杨威 <[email protected]> | 2023-01-10 23:53:24 +0800 |
|---|---|---|
| committer | 杨威 <[email protected]> | 2023-01-11 11:50:53 +0800 |
| commit | 8393d32ba6aeec6ff5a1a3143cb3fde2b88a10a4 (patch) | |
| tree | 8931d569aeb8099c356c56a03010e33c5234de90 /src/common | |
| parent | 351930141a08886cbd31d1968cfe66de2fbcc3dd (diff) | |
🌈 style(linter check): reduce lint check warning
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/linux_kernel_jhash.c | 1 | ||||
| -rw-r--r-- | src/common/net_common.c | 5 | ||||
| -rw-r--r-- | src/common/sapp_log.c | 1 | ||||
| -rw-r--r-- | src/common/sapp_mem.c | 1 | ||||
| -rw-r--r-- | src/common/stream_addr_inet.c | 1 |
5 files changed, 7 insertions, 2 deletions
diff --git a/src/common/linux_kernel_jhash.c b/src/common/linux_kernel_jhash.c index 2abf635..39c0500 100644 --- a/src/common/linux_kernel_jhash.c +++ b/src/common/linux_kernel_jhash.c @@ -4,6 +4,7 @@ extern "C" { #include "sapp_api.h"
#include "sapp_private_api.h"
+#include "sapp_declaration.h"
diff --git a/src/common/net_common.c b/src/common/net_common.c index 22f6306..1079722 100644 --- a/src/common/net_common.c +++ b/src/common/net_common.c @@ -1,5 +1,6 @@ #include "sapp_api.h" #include "sapp_private_api.h" +#include "sapp_declaration.h" #ifdef __cplusplus @@ -1499,6 +1500,7 @@ char *sapp_memmove_for_blank_table(char *data, int max_len) while(('\t' == data[0]) || (' ' ==data[0])){ memmove(data, data+1, max_len-1); } + return data; } /* @@ -1600,13 +1602,12 @@ const char *sapp_raw_ipv6_ntop(const struct mesa_ip6_hdr *ip6_hdr, char *out_buf const char *sapp_rawpkt_ntop(const raw_pkt_t *raw_pkt, int greedy_inner_layer, char *out_buf, int buf_len) { - const struct mesa_ethernet_hdr *ehdr; const struct mesa_ip4_hdr *ip4hdr; const struct mesa_ip6_hdr *ip6hdr; const struct mesa_tcp_hdr *thdr; const struct mesa_udp_hdr *uhdr; char ipsrc_str[64], ipdst_str[64]; - unsigned short sport, dport, ipid, transport_checksum; + unsigned short sport, dport, ipid=0, transport_checksum; unsigned char ip_pro; if(greedy_inner_layer){ diff --git a/src/common/sapp_log.c b/src/common/sapp_log.c index 4d4b26a..f3d8ba4 100644 --- a/src/common/sapp_log.c +++ b/src/common/sapp_log.c @@ -4,6 +4,7 @@ extern "C" { #include "sapp_api.h" #include "sapp_private_api.h" +#include "sapp_declaration.h" #include "support/tomlc99_wrap.h" diff --git a/src/common/sapp_mem.c b/src/common/sapp_mem.c index 0f93a74..7634d1a 100644 --- a/src/common/sapp_mem.c +++ b/src/common/sapp_mem.c @@ -1,5 +1,6 @@ #include "sapp_api.h" #include "sapp_private_api.h" +#include "sapp_declaration.h" #ifdef __cplusplus extern "C" { diff --git a/src/common/stream_addr_inet.c b/src/common/stream_addr_inet.c index be9a632..cf92436 100644 --- a/src/common/stream_addr_inet.c +++ b/src/common/stream_addr_inet.c @@ -8,6 +8,7 @@ */ #include "sapp_api.h" #include "sapp_private_api.h" +#include "sapp_declaration.h" #ifdef __cplusplus extern "C" { |
