mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 00:53:37 +08:00
adapt unit tests to additional NULL checks
This commit is contained in:
@@ -16,6 +16,15 @@
|
||||
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)
|
||||
{
|
||||
@@ -42,7 +51,7 @@ default_netif_add(void)
|
||||
{
|
||||
struct netif *n;
|
||||
fail_unless(netif_default == NULL);
|
||||
n = netif_add_noaddr(&test_netif6, NULL, default_netif_init, NULL);
|
||||
n = netif_add_noaddr(&test_netif6, NULL, default_netif_init, dummy_input_function);
|
||||
fail_unless(n == &test_netif6);
|
||||
netif_set_default(&test_netif6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user