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:
Joel Sherrill
1996-08-15 18:58:09 +00:00
parent b03ab63061
commit f3e191461c
2 changed files with 6 additions and 4 deletions

View File

@@ -166,7 +166,8 @@ int clock_gettime(
time_t seconds;
long ticks;
assert( tp );
if ( !tp )
set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
@@ -212,7 +213,7 @@ int clock_getres(
)
{
if ( !res )
set_errno_and_return_minus_one( EINVAL );
set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {

View File

@@ -166,7 +166,8 @@ int clock_gettime(
time_t seconds;
long ticks;
assert( tp );
if ( !tp )
set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
@@ -212,7 +213,7 @@ int clock_getres(
)
{
if ( !res )
set_errno_and_return_minus_one( EINVAL );
set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {