mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-09 23:57:49 -04:00
Code review suggestion
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
91e6449523
commit
cba502370b
1 changed files with 2 additions and 1 deletions
|
@ -43,12 +43,13 @@ struct event * event_create( void )
|
|||
{
|
||||
struct event * ev = malloc( sizeof( struct event ) );
|
||||
|
||||
if( ev )
|
||||
if( ev != NULL )
|
||||
{
|
||||
ev->event_triggered = false;
|
||||
pthread_mutex_init( &ev->mutex, NULL );
|
||||
pthread_cond_init( &ev->cond, NULL );
|
||||
}
|
||||
|
||||
return ev;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue