Skip to content

Commit

Permalink
Code review suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Aggarwal <[email protected]>
  • Loading branch information
aggarg committed Jun 7, 2024
1 parent 91e6449 commit cba5023
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion portable/ThirdParty/GCC/Posix/utils/wait_for_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cba5023

Please sign in to comment.