summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mqueueclose.c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-18 16:31:57 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2008-01-18 16:31:57 +0000
commitc3925dbe923bf0944235bc2c4556955f35b0dc91 (patch)
treecebd73d709e9f2c152f42d14362923dded35f0ef /cpukit/posix/src/mqueueclose.c
parent2008-01-18 David Erickson <David.Erickson@drdc-rddc.gc.ca> (diff)
downloadrtems-c3925dbe923bf0944235bc2c4556955f35b0dc91.tar.bz2
2008-01-18 Jennifer Averett <jennifer.averett@OARcorp.com>
* posix/include/rtems/posix/timer.h, posix/src/cleanuppop.c, posix/src/cleanuppush.c, posix/src/mqueueclose.c, posix/src/timergettime.c, posix/src/timersettime.c, score/include/rtems/score/timespec.h:
Diffstat (limited to 'cpukit/posix/src/mqueueclose.c')
-rw-r--r--cpukit/posix/src/mqueueclose.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c
index e95118b2e0..35b4dc3ec1 100644
--- a/cpukit/posix/src/mqueueclose.c
+++ b/cpukit/posix/src/mqueueclose.c
@@ -11,7 +11,7 @@
* This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
* time.
*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -53,10 +53,9 @@ int mq_close(
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
- switch ( location ) {
-
- case OBJECTS_LOCAL:
- /*
+ if ( location == OBJECTS_LOCAL ) {
+ /* OBJECTS_LOCAL:
+ *
* First update the actual message queue to reflect this descriptor
* being disassociated. This may result in the queue being really
* deleted.
@@ -76,13 +75,11 @@ int mq_close(
_Thread_Enable_dispatch();
return 0;
+ }
-#if defined(RTEMS_MULTIPROCESSING)
- case OBJECTS_REMOTE:
-#endif
- case OBJECTS_ERROR:
- break;
- }
-
- rtems_set_errno_and_return_minus_one( EBADF );
+ /*
+ * OBJECTS_REMOTE:
+ * OBJECTS_ERROR:
+ */
+ rtems_set_errno_and_return_minus_one( EBADF );
}