🔧 build(enable cppcheck on build): eliminate cppcheck error
This commit is contained in:
@@ -377,7 +377,7 @@ static void craft_and_send_tcp_packet(struct stellar *st, struct session *sess,
|
||||
else
|
||||
{
|
||||
tcp_seq = uint32_add(pkt_exdata->tcp_ack, pkt_exdata->inc_ack);
|
||||
tcp_ack = uint32_add(pkt_exdata->tcp_seq, pkt_exdata->tcp_payload_len + (pkt_exdata->tcp_flags & TH_SYN ? 1 : 0));
|
||||
tcp_ack = uint32_add(pkt_exdata->tcp_seq, pkt_exdata->tcp_payload_len + ((pkt_exdata->tcp_flags & TH_SYN) ? 1 : 0));
|
||||
|
||||
pkt_exdata->inc_ack += tcp_payload_len;
|
||||
pkt_exdata->inc_ack += (tcp_flags & TH_FIN) ? 1 : 0; // inject RST packer after FIN packer, ack should be increased by 1
|
||||
|
||||
@@ -279,13 +279,8 @@ static void usage(char *cmd)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int opt = 0;
|
||||
<<<<<<< HEAD
|
||||
struct runtime rte = {0};
|
||||
while ((opt = getopt(argc, argv, "f:tvh")) != -1)
|
||||
=======
|
||||
struct runtime rte = {};
|
||||
while ((opt = getopt(argc, argv, "f:tvch")) != -1)
|
||||
>>>>>>> 654eee3 (🔧 build(compile Werror): reduce warning)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user