zephyr/lib
ferar alashkar 595bcda87c lib: os: dec: add misra-c2012 compliance changes
1. change explicit type cast of essential character type, complying with
required [misra-c2012-10.2] rule which states; Expressions of
essentially character type shall not be used inappropriately in addition
and subtraction operations, and

2. add explicit boolean type to 'if' statement controlling expression,
consolidating it with 'buflen' type, thus improving code readability and
maintainability , complying with required [misra-c2012-14.4] rule which
states; ; The controlling expression of an if statement and the
controlling expression of an iteration-statement shall have essentially
boolean type, and

3. add enclosing parentheses enforcing and clarifying precedence of
operators, improving code readability and maintainability, complying
with *advisory* [misra-c2012-12.1] rule which states; The precedence of
operators within expressions should be made explicit.

Found as a coding guideline violation (Rules 10.2, 14.4), and coding
guideline recommendation (Rule 12.1) by static code scanning tool.

Note: Tested on STM32L5 Nucleo-144 board (stm32l552xx).

Signed-off-by: ferar alashkar <ferar.alashkar@gmail.com>
2023-07-28 11:15:44 +02:00
..
acpi lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
cpp lib: cpp: name the choice group for selecting C++ standard 2023-07-27 22:33:14 -04:00
hash lib: hash: use new c++ Kconfig symbols 2023-07-26 14:53:51 +02:00
libc libc: remove no longer valid kconfig comment 2023-07-20 12:58:36 -04:00
open-amp open-amp: Fix compilation with cache enabled 2023-04-18 12:12:56 +02:00
os lib: os: dec: add misra-c2012 compliance changes 2023-07-28 11:15:44 +02:00
posix pthread: facilitate dynamically allocated thread stacks 2023-07-24 12:59:43 -04:00
smf lib: smf: fix include 2022-05-25 11:14:18 +09:00
CMakeLists.txt lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00
Kconfig lib: acpi: added acpi support using acpica lib 2023-06-30 17:53:01 +03:00