diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-17 16:17:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-17 16:17:59 +0000 |
commit | 863a24e81e6bb9d0414be10d340d2efb2093a09d (patch) | |
tree | 0d90b69cbd15f8a10c1ccc38ef4194c72dce72eb /cpukit/posix/src/mutexattrgettype.c | |
parent | 2009-07-17 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-863a24e81e6bb9d0414be10d340d2efb2093a09d.tar.bz2 |
2009-07-17 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mutexattrgettype.c: Restructure a bit to make code coverage
analysis easier.
Diffstat (limited to 'cpukit/posix/src/mutexattrgettype.c')
-rw-r--r-- | cpukit/posix/src/mutexattrgettype.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |