summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 20:59:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 20:59:41 +0000
commit1087564111495d951fd96eb6e78f231fd2492501 (patch)
tree2116c685b4df1b0240ce08f1920aadedd17c5baf /cpukit/posix
parentsleep: wrong page number (diff)
downloadrtems-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.c3
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 ) {
/*