log: Make statements evaluate boolean expressions
MISRA-C requires that the if statement has essentially Boolean type. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
6d50df212f
commit
f342019986
8 changed files with 29 additions and 28 deletions
|
@ -78,7 +78,7 @@ static int shell_backend_cmd_execute(const struct shell *shell,
|
|||
char const *name = argv[-1];
|
||||
const struct log_backend *backend = backend_find(name);
|
||||
|
||||
if (backend) {
|
||||
if (backend != NULL) {
|
||||
func(shell, backend, argc, argv);
|
||||
} else {
|
||||
shell_error(shell, "Invalid backend: %s", name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue