make netif->init return err_t instead of void.Patch from David Le Corfec

This commit is contained in:
jani
2003-02-20 11:51:53 +00:00
parent 35ef1e1b86
commit cc31bb9358
7 changed files with 16 additions and 8 deletions

View File

@@ -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;
}
/*-----------------------------------------------------------------------------------*/

View File

@@ -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;
}