<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 23, 2023 at 10:40 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Close #4863.<br>
---<br>
 cpukit/include/rtems/score/objectimpl.h | 4 +---<br>
 1 file changed, 1 insertion(+), 3 deletions(-)<br>
<br>
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h<br>
index c58957ccb5..a1a87b5ccb 100644<br>
--- a/cpukit/include/rtems/score/objectimpl.h<br>
+++ b/cpukit/include/rtems/score/objectimpl.h<br>
@@ -542,9 +542,7 @@ static inline bool _Objects_Is_api_valid(<br>
   uint32_t   the_api<br>
 )<br>
 {<br>
-  if ( !the_api || the_api > OBJECTS_APIS_LAST )<br>
-   return false;<br>
-  return true;<br>
+  return ( 1 <= the_api && the_api <= OBJECTS_APIS_LAST );<br>
 }<br></blockquote><div><br></div><div>I'd really prefer we avoid compound logical expressions since it </div><div>becomes something that needs MCDC analysis at higher levels</div><div>of verification/qualification. </div><div><br></div><div>Please rewrite using simple logical expressions even if it means</div><div>two exit paths at the source leve. It's the same machine code.</div><div><br></div><div>--joel </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
 /**<br>
-- <br>
2.35.3<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>