mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 00:23:39 +08:00
make netif->init return err_t instead of void.Patch from David Le Corfec
This commit is contained in:
@@ -67,12 +67,13 @@ loopif_output(struct netif *netif, struct pbuf *p,
|
||||
return ERR_MEM;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
err_t
|
||||
loopif_init(struct netif *netif)
|
||||
{
|
||||
netif->name[0] = 'l';
|
||||
netif->name[1] = 'o';
|
||||
netif->output = loopif_output;
|
||||
return ERR_OK;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ slipif_loop(void *nf)
|
||||
* Call the arch specific sio_open and remember
|
||||
* the opened device in the state field of the netif.
|
||||
*/
|
||||
void
|
||||
err_t
|
||||
slipif_init(struct netif *netif)
|
||||
{
|
||||
|
||||
@@ -209,6 +209,9 @@ slipif_init(struct netif *netif)
|
||||
netif->mtu = 1500;
|
||||
|
||||
netif->state = sio_open(netif->num);
|
||||
if (!netif->state)
|
||||
return ERR_IF;
|
||||
|
||||
sys_thread_new(slipif_loop, netif);
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user