From c961c06bbe213139b817e495fdba0eb64d5353a1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 7 Jan 2008 15:33:33 +0000 Subject: 2008-01-07 Joel Sherrill * score/inline/rtems/score/isr.inl: Fix spacing. * score/src/apimutexallocate.c: Fix spacing. * score/src/coremsgseize.c: Check for message pending instead of message pending count to avoid dead code from inlined chain routine. It checks if the chain is empty so is redundant to count == 0. --- cpukit/score/src/coremsgseize.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/coremsgseize.c') diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c index fc11e3e80d..010f201b78 100644 --- a/cpukit/score/src/coremsgseize.c +++ b/cpukit/score/src/coremsgseize.c @@ -76,10 +76,9 @@ void _CORE_message_queue_Seize( executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); - if ( the_message_queue->number_of_pending_messages != 0 ) { + the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); + if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; - - the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); _ISR_Enable( level ); *size = the_message->Contents.size; -- cgit v1.2.3