mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Code review suggestion
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
91e6449523
commit
cba502370b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue