From f3e191461c7fef615fb9adc1c3d0cba8112c7ec3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 15 Aug 1996 18:58:09 +0000 Subject: clock_gettime: changed assert condition to a standard error code clock_getres: now checking for a null pointer being passed in --- cpukit/posix/src/time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpukit') diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c index 3a36bb33f5..3302f78554 100644 --- a/cpukit/posix/src/time.c +++ b/cpukit/posix/src/time.c @@ -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 ) { -- cgit v1.2.3