#4809: Incorrect Formatting of "!" Statements
----------------------------+--------------------
Reporter: Daniel Páscoa | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: admin | Version:
Severity: normal | Keywords:
Blocked By: | Blocking:
----------------------------+--------------------
**Description:**
The usage of the "!" operator in statements may deviate from the
recommended check format of " if (ptr != NULL)" instead of "if (!ptr)".
For reference, please consult the "Coding Conventions" section of the
RTEMS Software Engineering. Kindly review the statement format to ensure
compliance.
The attached excel lists in a systematic way the sources where this issue
applies.
**Additional Notes:**
Although there might not be a functional problem/impact regarding
expressions like "if (!ptr)" (explained in the excel attached) as this is
not always obvious to everyone at first glance. So, correct these cases as
in the related recommendation of the RTEMS Software Engineering document.
This ticket was raised as an outcome of the Independent SW Verification
and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs
(https://rtems-qual.io.esa.int). Original ISVV reference for this issue is
RTEMS-SMP-CODE-VER-009.
**File list (please check the attached excel for more information):**
cpukit\include\rtems\score\chainimpl.h
cpukit\include\rtems\score\coremuteximpl.h
cpukit\include\rtems\score\coresemimpl.h
cpukit\include\rtems\score\heapimpl.h
cpukit\include\rtems\score\mrspimpl.h
cpukit\include\rtems\score\objectimpl.h
cpukit\include\rtems\score\schedulerimpl.h
cpukit\include\rtems\score\schedulersmpimpl.h
cpukit\include\rtems\score\threadimpl.h
cpukit\include\rtems\score\watchdogimpl.h
cpukit\libc\string\memcmp.c
cpukit\libc\string\memcpy.c
cpukit\libc\string\memset.c
cpukit\libc\string\strchr.c
cpukit\libc\string\strcmp.c
cpukit\libc\string\strlen.c
cpukit\libtest\t-test.c
cpukit\rtems\src\barriercreate.c
cpukit\rtems\src\clockgettod.c
cpukit\rtems\src\clockgetuptime.c
cpukit\rtems\src\eventreceive.c
cpukit\rtems\src\eventseize.c
cpukit\rtems\src\msgqconstruct.c
cpukit\rtems\src\partcreate.c
cpukit\rtems\src\partreturnbuffer.c
cpukit\rtems\src\ratemoncreate.c
cpukit\rtems\src\ratemonperiod.c
cpukit\rtems\src\scheduleraddprocessor.c
cpukit\rtems\src\semcreate.c
cpukit\rtems\src\signalcatch.c
cpukit\rtems\src\signalsend.c
cpukit\rtems\src\systemeventreceive.c
cpukit\rtems\src\taskconstruct.c
cpukit\rtems\src\taskmode.c
cpukit\rtems\src\tasksetpriority.c
cpukit\rtems\src\tasksetscheduler.c
cpukit\rtems\src\taskwakewhen.c
cpukit\rtems\src\timercreate.c
cpukit\rtems\src\timerserverfireafter.c
cpukit\rtems\src\timerserverfirewhen.c
cpukit\sapi\src\extensioncreate.c
cpukit\score\src\coremsgseize.c
cpukit\score\src\coremsgsubmit.c
cpukit\score\src\iovprintf.c
cpukit\score\src\kern_tc.c
cpukit\score\src\objectgetinfo.c
cpukit\score\src\scheduleredfsmp.c
cpukit\score\src\schedulerprioritychangepriority.c
cpukit\score\src\schedulerpriorityyield.c
cpukit\score\src\schedulersetaffinity.c
cpukit\score\src\smp.c
cpukit\score\src\threadchangepriority.c
cpukit\score\src\threaddispatch.c
cpukit\score\src\threadinitialize.c
cpukit\score\src\threadqenqueue.c
cpukit\score\src\threadqops.c
cpukit\score\src\threadresettimeslice.c
cpukit\score\src\threadstart.c
cpukit\score\src\threadtimeout.c
bsps\shared\dev\clock\clockimpl.h
bsps\shared\irq\irq-affinity.c
bsps\shared\irq\irq-enable-disable.c
bsps\shared\irq\irq-generic.c
bsps\shared\irq\irq-raise-clear.c
bsps\sparc\leon3\start\bspsmp.c
cpukit\score\src\rbtreeiterate.c
--
Ticket URL: <http://devel.rtems.org/ticket/4809>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs