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:
Joan Lledó 2019-08-16 08:40:24 +02:00 committed by Simon Goldschmidt
parent 785b7aba3c
commit 0aad45593f

View File

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