mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-16 18:03:44 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user