test_tcp: remove unnecessary memsets

test_tcp_init_netif() memsets both netif and txcounters, so no need to manually do it
This commit is contained in:
Joel Cunningham 2017-03-23 14:30:28 -05:00
parent 34c9e30225
commit 648b2b6f2b
2 changed files with 0 additions and 10 deletions

View File

@ -107,7 +107,6 @@ START_TEST(test_tcp_recv_inseq)
LWIP_UNUSED_ARG(_i);
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -159,7 +158,6 @@ START_TEST(test_tcp_malformed_header)
LWIP_UNUSED_ARG(_i);
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -604,7 +602,6 @@ static void test_tcp_tx_full_window_lost(u8_t zero_window_probe_from_unsent)
IP_ADDR4(&netmask, 255, 255, 255, 0);
test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
memset(&counters, 0, sizeof(counters));
memset(&txcounters, 0, sizeof(txcounters));
/* create and initialize the pcb */
pcb = test_tcp_new_counters_pcb(&counters);

View File

@ -166,7 +166,6 @@ START_TEST(test_tcp_recv_ooseq_FIN_OOSEQ)
LWIP_UNUSED_ARG(_i);
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -308,7 +307,6 @@ START_TEST(test_tcp_recv_ooseq_FIN_INSEQ)
LWIP_UNUSED_ARG(_i);
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -485,7 +483,6 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin)
}
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -578,7 +575,6 @@ START_TEST(test_tcp_recv_ooseq_overrun_rxwin_edge)
}
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -670,7 +666,6 @@ START_TEST(test_tcp_recv_ooseq_max_bytes)
}
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -751,7 +746,6 @@ START_TEST(test_tcp_recv_ooseq_max_pbufs)
}
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);
@ -854,7 +848,6 @@ static void test_tcp_recv_ooseq_double_FINs(int delay_packet)
}
/* initialize local vars */
memset(&netif, 0, sizeof(netif));
IP_ADDR4(&local_ip, 192, 168, 1, 1);
IP_ADDR4(&remote_ip, 192, 168, 1, 2);
IP_ADDR4(&netmask, 255, 255, 255, 0);