Skip to content
Commit 77114353 authored by Maksim Masalski's avatar Maksim Masalski Committed by Kumar Gala
Browse files

lib: remove redundant check for null



Statement "cont = dropped_item != NULL" first checks if "dropped_item"
returns null or not null, then assigns to "cont".
If "dropped_item" is null then "cont = 0",
if "dropped_item" is not null then "cont = 1".

As a result in line below no need to check "dropped_item" again
It is enough to check state of the "cont" variable,
to be sure what returned "dropped_item".

Found as a coding guideline violation (MISRA R4.1) by static
coding scanning tool.

Signed-off-by: default avatarMaksim Masalski <maksim.masalski@intel.com>
parent 951e72b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment