adapt unit tests to additional NULL checks

This commit is contained in:
Simon Goldschmidt
2018-06-12 13:47:13 +02:00
parent 1bf323e12f
commit a26a2e1340
3 changed files with 27 additions and 6 deletions

View File

@@ -32,6 +32,15 @@ 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)
{
@@ -62,7 +71,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, NULL));
&test_gw, NULL, default_netif_init, dummy_input_function));
netif_set_up(&test_netif);
}