From 863a24e81e6bb9d0414be10d340d2efb2093a09d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 17 Jul 2009 16:17:59 +0000 Subject: 2009-07-17 Joel Sherrill * posix/src/mutexattrgettype.c: Restructure a bit to make code coverage analysis easier. --- cpukit/posix/src/mutexattrgettype.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/src/mutexattrgettype.c') diff --git a/cpukit/posix/src/mutexattrgettype.c b/cpukit/posix/src/mutexattrgettype.c index 2d392967a3..59b69de0d9 100644 --- a/cpukit/posix/src/mutexattrgettype.c +++ b/cpukit/posix/src/mutexattrgettype.c @@ -29,7 +29,13 @@ int pthread_mutexattr_gettype( int *type ) { - if ( !attr || !attr->is_initialized || !type ) + if ( !attr ) + return EINVAL; + + if ( !attr->is_initialized ) + return EINVAL; + + if ( !type ) return EINVAL; *type = attr->type; -- cgit v1.2.3