diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-11-06 23:49:51 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-11-07 00:02:36 +0100 |
commit | 5d56288a113aa3aa2e68dbf54f0acde0650bafcb (patch) | |
tree | bc4e9904feac2a8c9e5f5287774416b1aa3822f9 /examples/c-captured | |
parent | 84b12cd02c1f11d134f00b0a066414a677a53719 (diff) |
Fixed more SonarCloud complaints.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-captured')
-rw-r--r-- | examples/c-captured/c-captured.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c index e810f3e70..14457a175 100644 --- a/examples/c-captured/c-captured.c +++ b/examples/c-captured/c-captured.c @@ -666,7 +666,8 @@ static void syslog_event(struct nDPIsrvd_socket * const sock, } if (src_port != NULL && dst_port != NULL) { - size_t src_port_len = 0, dst_port_len = 0; + size_t src_port_len = 0; + size_t dst_port_len = 0; char const * const tmp_src_port_str = TOKEN_GET_VALUE(sock, src_port, &src_port_len); char const * const tmp_dst_port_str = TOKEN_GET_VALUE(sock, dst_port, &dst_port_len); if (tmp_src_port_str != NULL && tmp_dst_port_str != NULL) @@ -938,8 +939,8 @@ static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_sock syslog_event(sock, flow, "midstream"); } - if ((flow_user->packets == NULL || flow_user->flow_max_packets == 0 || - utarray_len(flow_user->packets) == 0)) + if (flow_user->packets == NULL || flow_user->flow_max_packets == 0 || + utarray_len(flow_user->packets) == 0) { if (logging_mode != 0) { |