[rtems commit] posix: Do not touch msg priority in case of error
Sebastian Huber
sebh at rtems.org
Tue Oct 24 08:19:55 UTC 2017
Module: rtems
Branch: master
Commit: a0d0910765884f6e20311a5ba83bcc9ec73b122a
Changeset: http://git.rtems.org/rtems/commit/?id=a0d0910765884f6e20311a5ba83bcc9ec73b122a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Oct 20 16:53:04 2017 +0200
posix: Do not touch msg priority in case of error
---
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 f91a513..416e798 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;
}
More information about the vc
mailing list