summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-21 19:59:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-21 19:59:13 +0000
commit970e001f679c4274ee6cbe1adbde22e0e0f7e90c (patch)
treed55c4eb5cb1f2abf961166e4a1ca47619e60ae7d
parentRemove (unused). (diff)
downloadrtems-970e001f679c4274ee6cbe1adbde22e0e0f7e90c.tar.bz2
2011-08-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1890/cpukit * posix/src/mqueuerecvsupp.c: POSIX says msg_prio is allowed to be NULL.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/posix/src/mqueuerecvsupp.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 25d2e9a96d..0a8e11bc5a 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1890/cpukit
+ * posix/src/mqueuerecvsupp.c: POSIX says msg_prio is allowed to be
+ NULL.
+
2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1855/cpukit
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
index dff76c184d..a0b8ee8c3a 100644
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ b/cpukit/posix/src/mqueuerecvsupp.c
@@ -11,7 +11,7 @@
* This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
* time.
*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -105,8 +105,11 @@ ssize_t _POSIX_Message_queue_Receive_support(
);
_Thread_Enable_dispatch();
- *msg_prio =
- _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
+ if (msg_prio) {
+ *msg_prio = _POSIX_Message_queue_Priority_from_core(
+ _Thread_Executing->Wait.count
+ );
+ }
if ( !_Thread_Executing->Wait.return_code )
return length_out;