summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-15 18:58:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-15 18:58:09 +0000
commitf3e191461c7fef615fb9adc1c3d0cba8112c7ec3 (patch)
treeaa3c4b84b23f973ffb20d5f0dfb7cd9673ea9d90 /cpukit
parentsched_rr_get_interval: converted assert condition into a standard error (diff)
downloadrtems-f3e191461c7fef615fb9adc1c3d0cba8112c7ec3.tar.bz2
clock_gettime: changed assert condition to a standard error code
clock_getres: now checking for a null pointer being passed in
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/posix/src/time.c5
1 files changed, 3 insertions, 2 deletions
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 ) {