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 | |
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.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/posix/src/mutexattrgettype.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 8303f58a09..f599672df0 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,10 @@ 2009-07-17 Joel Sherrill <joel.sherrill@OARcorp.com> + * posix/src/mutexattrgettype.c: Restructure a bit to make code coverage + analysis easier. + +2009-07-17 Joel Sherrill <joel.sherrill@OARcorp.com> + * score/src/watchdogadjusttochain.c: Correct bug in recent rework. Coverage not impacted. 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; |