x86: make tests of a value against zero should be made explicit

Tests of a value against zero should be made explicit, unless the
operand is effectively Boolean. This is based on MISRA rule 14.4.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-03-29 17:13:18 -04:00
commit 0630452890
5 changed files with 6 additions and 6 deletions

View file

@ -110,7 +110,7 @@ void z_x86_early_serial_init(void)
early_serial_init_done = true;
if (suppressed_chars) {
if (suppressed_chars != 0U) {
printk("WARNING: %u chars lost before early serial init\n",
suppressed_chars);
}