mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-21 04:14:26 +08:00
clock_getres: added error check for NULL pointer being passed in.
This commit is contained in:
@@ -215,6 +215,9 @@ int clock_getres(
|
||||
struct timespec *res
|
||||
)
|
||||
{
|
||||
if ( !res )
|
||||
set_errno_and_return_minus_one( EINVAL );
|
||||
|
||||
switch ( clock_id ) {
|
||||
|
||||
/*
|
||||
|
||||
@@ -215,6 +215,9 @@ int clock_getres(
|
||||
struct timespec *res
|
||||
)
|
||||
{
|
||||
if ( !res )
|
||||
set_errno_and_return_minus_one( EINVAL );
|
||||
|
||||
switch ( clock_id ) {
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user