mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-17 11:42:56 +00:00
Unix port: sio module: memset struct sigaction to 0
* Use memset to set all struct sigaction fields to 0 instead of doing it field by field, since fields depend on the architecture.
This commit is contained in:
parent
785b7aba3c
commit
0aad45593f
@ -131,6 +131,7 @@ static int sio_init( char * device, int devnum, sio_status_t * siostat )
|
||||
}
|
||||
|
||||
#if ! (PPP_SUPPORT || LWIP_HAVE_SLIPIF)
|
||||
memset(&saio, 0, sizeof(struct sigaction));
|
||||
/* install the signal handler before making the device asynchronous */
|
||||
switch ( devnum )
|
||||
{
|
||||
@ -147,10 +148,6 @@ static int sio_init( char * device, int devnum, sio_status_t * siostat )
|
||||
break;
|
||||
}
|
||||
|
||||
saio.sa_flags = 0;
|
||||
#if defined(LWIP_UNIX_LINUX)
|
||||
saio.sa_restorer = NULL;
|
||||
#endif /* LWIP_UNIX_LINUX */
|
||||
sigaction( SIGIO,&saio,NULL );
|
||||
|
||||
/* allow the process to receive SIGIO */
|
||||
|
Loading…
x
Reference in New Issue
Block a user