kernel: syscall: Object validation checks boolean statement

The function that checks if an object is valid is essentially a boolean
function. Just changing its return type to reflect it.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-11-21 16:26:00 -08:00 committed by Anas Nashif
commit b7287ceb4e

View file

@ -411,8 +411,8 @@ static inline int _obj_validation_check(struct _k_object *ko,
#define Z_SYSCALL_IS_OBJ(ptr, type, init) \
Z_SYSCALL_VERIFY_MSG( \
!_obj_validation_check(_k_object_find((void *)ptr), (void *)ptr, \
type, init), "access denied")
_obj_validation_check(_k_object_find((void *)ptr), (void *)ptr, \
type, init) == 0, "access denied")
/**
* @brief Runtime check driver object pointer for presence of operation