mirror of https://github.com/thesofproject/sof.git
test: cmocka: src: avoid NULL comparison
Replace NULL comparison with boolean negation. Issue found using Coccinelle. Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
This commit is contained in:
parent
e197132dad
commit
22be53b98a
|
@ -22,7 +22,7 @@ static int setup(void **state)
|
|||
|
||||
pipeline_posn_init(sof_get());
|
||||
|
||||
if (pipeline_data == NULL)
|
||||
if (!pipeline_data)
|
||||
return -1;
|
||||
|
||||
struct sof_ipc_pipe_new pipe_desc = { .core = 1, .priority = 2 };
|
||||
|
|
|
@ -23,7 +23,7 @@ static int setup(void **state)
|
|||
{
|
||||
struct test_data *data = malloc(sizeof(struct test_data));
|
||||
|
||||
if (data == NULL)
|
||||
if (!data)
|
||||
return -1;
|
||||
|
||||
data->head = malloc(sizeof(struct list_item));
|
||||
|
|
|
@ -23,7 +23,7 @@ static int setup(void **state)
|
|||
{
|
||||
struct test_data *data = malloc(sizeof(struct test_data));
|
||||
|
||||
if (data == NULL)
|
||||
if (!data)
|
||||
return -1;
|
||||
|
||||
data->head = malloc(sizeof(struct list_item));
|
||||
|
|
|
@ -23,7 +23,7 @@ static int setup(void **state)
|
|||
{
|
||||
struct test_data *data = malloc(sizeof(struct test_data));
|
||||
|
||||
if (data == NULL)
|
||||
if (!data)
|
||||
return -1;
|
||||
|
||||
data->head = malloc(sizeof(struct list_item));
|
||||
|
|
|
@ -23,7 +23,7 @@ static int setup(void **state)
|
|||
{
|
||||
struct test_data *data = malloc(sizeof(struct test_data));
|
||||
|
||||
if (data == NULL)
|
||||
if (!data)
|
||||
return -1;
|
||||
|
||||
data->head = malloc(sizeof(struct list_item));
|
||||
|
|
Loading…
Reference in New Issue