[PATCH 01/16] posix: Do not touch msg priority in case of error
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Oct 23 13:53:32 UTC 2017
---
cpukit/posix/src/mqueuerecvsupp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
index f91a513181..416e7989fd 100644
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ b/cpukit/posix/src/mqueuerecvsupp.c
@@ -107,15 +107,15 @@ ssize_t _POSIX_Message_queue_Receive_support(
&queue_context
);
+ if ( status != STATUS_SUCCESSFUL ) {
+ rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
+ }
+
if ( msg_prio != NULL ) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
executing->Wait.count
);
}
- if ( status != STATUS_SUCCESSFUL ) {
- rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
- }
-
return length_out;
}
--
2.12.3
More information about the devel
mailing list