From e11262c13e9adeadf31b5ac959b83d526b9f2851 Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Mon, 3 Feb 2020 10:52:16 -0600 Subject: [PATCH] tests: lib: os: onoff: address Coverity complaint Coverity believes that a field is null when it isn't. Duplicate the assert from 20 lines up in hopes it learns better. Signed-off-by: Peter Bigot --- tests/lib/onoff/src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/lib/onoff/src/main.c b/tests/lib/onoff/src/main.c index d7bb902425e..0cf2de278df 100644 --- a/tests/lib/onoff/src/main.c +++ b/tests/lib/onoff/src/main.c @@ -805,6 +805,8 @@ static void test_async(void) cli[0].result = 1 + start_state.retval; zassert_equal(cli_result(&cli[0]), -EAGAIN, "fetch failed"); + zassert_false(start_state.notify == NULL, + "start invoked"); notify(&start_state); zassert_equal(cli_result(&cli[0]), start_state.retval, "start notified");