coding guidelines rule 14_3_j: add explicit case check
Violation of the [MISRAC2012-RULE_14_3-j]: Boolean operations whose results are invariant shall not be permitted Probably in that part of code is a misprint. Added to check _OBJ_INIT_FALSE case explicitly Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This commit is contained in:
parent
6586d0f5c4
commit
929956df70
1 changed files with 1 additions and 1 deletions
|
@ -669,7 +669,7 @@ int z_object_validate(struct z_object *ko, enum k_objects otype,
|
|||
if (unlikely((ko->flags & K_OBJ_FLAG_INITIALIZED) == 0U)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (init < _OBJ_INIT_TRUE) { /* _OBJ_INIT_FALSE case */
|
||||
} else if (init == _OBJ_INIT_FALSE) { /* _OBJ_INIT_FALSE case */
|
||||
/* Object MUST NOT be initialized */
|
||||
if (unlikely((ko->flags & K_OBJ_FLAG_INITIALIZED) != 0U)) {
|
||||
return -EADDRINUSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue