[rtems commit] score: Remove double assignment

Sebastian Huber sebh at rtems.org
Mon Feb 1 06:20:12 UTC 2021


Module:    rtems
Branch:    master
Commit:    0c992065b8d7ae57ae3c88e349448cb5b1debca5
Changeset: http://git.rtems.org/rtems/commit/?id=0c992065b8d7ae57ae3c88e349448cb5b1debca5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 28 15:06:48 2021 +0100

score: Remove double assignment

This fix relates to a Coverity issue (UNUSED_VALUE).

---

 cpukit/score/src/scheduleredfsmp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpukit/score/src/scheduleredfsmp.c b/cpukit/score/src/scheduleredfsmp.c
index 985f06f..b8b1d9d 100644
--- a/cpukit/score/src/scheduleredfsmp.c
+++ b/cpukit/score/src/scheduleredfsmp.c
@@ -692,13 +692,12 @@ void _Scheduler_EDF_SMP_Pin(
 
   (void) scheduler;
   node = _Scheduler_EDF_SMP_Node_downcast( node_base );
-  rqi = (uint8_t) _Per_CPU_Get_index( cpu ) + 1;
 
   _Assert(
     _Scheduler_SMP_Node_state( &node->Base.Base ) == SCHEDULER_SMP_NODE_BLOCKED
   );
 
-  node = _Scheduler_EDF_SMP_Node_downcast( node_base );
+  rqi = (uint8_t) _Per_CPU_Get_index( cpu ) + 1;
   node->ready_queue_index = rqi;
   node->pinning_ready_queue_index = rqi;
 }



More information about the vc mailing list