unit tests: remove dummy netif input function

This partly reverts a26a2e13 after removing that NULL check again.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2018-06-13 10:46:44 +02:00
parent 61e3f49f69
commit 38614e4f3e
2 changed files with 2 additions and 20 deletions

View File

@ -32,15 +32,6 @@ etharp_remove_all(void)
}
}
static err_t
dummy_input_function(struct pbuf *p, struct netif *inp)
{
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(inp);
fail("this netif should have no input");
return ERR_VAL;
}
static err_t
default_netif_linkoutput(struct netif *netif, struct pbuf *p)
{
@ -71,7 +62,7 @@ default_netif_add(void)
fail_unless(netif_default == NULL);
netif_set_default(netif_add(&test_netif, &test_ipaddr, &test_netmask,
&test_gw, NULL, default_netif_init, dummy_input_function));
&test_gw, NULL, default_netif_init, NULL));
netif_set_up(&test_netif);
}

View File

@ -16,15 +16,6 @@
static struct netif test_netif6;
static int linkoutput_ctr;
static err_t
dummy_input_function(struct pbuf *p, struct netif *inp)
{
LWIP_UNUSED_ARG(p);
LWIP_UNUSED_ARG(inp);
fail("this netif should have no input");
return ERR_VAL;
}
static err_t
default_netif_linkoutput(struct netif *netif, struct pbuf *p)
{
@ -51,7 +42,7 @@ default_netif_add(void)
{
struct netif *n;
fail_unless(netif_default == NULL);
n = netif_add_noaddr(&test_netif6, NULL, default_netif_init, dummy_input_function);
n = netif_add_noaddr(&test_netif6, NULL, default_netif_init, NULL);
fail_unless(n == &test_netif6);
netif_set_default(&test_netif6);
}