forked from Imagelibrary/rtems
clock_gettime: changed assert condition to a standard error code
clock_getres: now checking for a null pointer being passed in
This commit is contained in:
@@ -166,7 +166,8 @@ int clock_gettime(
|
|||||||
time_t seconds;
|
time_t seconds;
|
||||||
long ticks;
|
long ticks;
|
||||||
|
|
||||||
assert( tp );
|
if ( !tp )
|
||||||
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
|
|
||||||
switch ( clock_id ) {
|
switch ( clock_id ) {
|
||||||
|
|
||||||
@@ -212,7 +213,7 @@ int clock_getres(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !res )
|
if ( !res )
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
|
|
||||||
switch ( clock_id ) {
|
switch ( clock_id ) {
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ int clock_gettime(
|
|||||||
time_t seconds;
|
time_t seconds;
|
||||||
long ticks;
|
long ticks;
|
||||||
|
|
||||||
assert( tp );
|
if ( !tp )
|
||||||
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
|
|
||||||
switch ( clock_id ) {
|
switch ( clock_id ) {
|
||||||
|
|
||||||
@@ -212,7 +213,7 @@ int clock_getres(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !res )
|
if ( !res )
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
set_errno_and_return_minus_one( EINVAL );
|
||||||
|
|
||||||
switch ( clock_id ) {
|
switch ( clock_id ) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user