summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/exec/posix/src/time.c5
-rw-r--r--cpukit/posix/src/time.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/c/src/exec/posix/src/time.c b/c/src/exec/posix/src/time.c
index 3a36bb33f5..3302f78554 100644
--- a/c/src/exec/posix/src/time.c
+++ b/c/src/exec/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 ) {
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 ) {