Code review suggestion

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav Aggarwal 2024-06-07 08:04:13 +00:00
parent 91e6449523
commit cba502370b

View file

@ -43,12 +43,13 @@ struct event * event_create( void )
{ {
struct event * ev = malloc( sizeof( struct event ) ); struct event * ev = malloc( sizeof( struct event ) );
if( ev ) if( ev != NULL )
{ {
ev->event_triggered = false; ev->event_triggered = false;
pthread_mutex_init( &ev->mutex, NULL ); pthread_mutex_init( &ev->mutex, NULL );
pthread_cond_init( &ev->cond, NULL ); pthread_cond_init( &ev->cond, NULL );
} }
return ev; return ev;
} }