diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 20:59:41 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 20:59:41 +0000 |
commit | 1087564111495d951fd96eb6e78f231fd2492501 (patch) | |
tree | 2116c685b4df1b0240ce08f1920aadedd17c5baf /cpukit/posix | |
parent | sleep: wrong page number (diff) | |
download | rtems-1087564111495d951fd96eb6e78f231fd2492501.tar.bz2 |
clock_getres: added error check for NULL pointer being passed in.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/src/time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c index 5e202111dd..a915d7617a 100644 --- a/cpukit/posix/src/time.c +++ b/cpukit/posix/src/time.c @@ -215,6 +215,9 @@ int clock_getres( struct timespec *res ) { + if ( !res ) + set_errno_and_return_minus_one( EINVAL ); + switch ( clock_id ) { /* |