tests: canbus: isotp: Fix wrong variable used for assert
The assert for error checking used the wrong variable. data_buf was checked instead of the ret variable. Fixes #22656 Coverity-CID: 208192 Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit is contained in:
parent
c9d76eef88
commit
1faaff1ea5
|
@ -191,7 +191,7 @@ static void receive_test_data(struct isotp_recv_ctx *recv_ctx,
|
|||
memset(data_buf, 0, sizeof(data_buf));
|
||||
ret = isotp_recv(recv_ctx, data_buf, sizeof(data_buf),
|
||||
K_MSEC(1000));
|
||||
zassert_true(data_buf >= 0, "recv error: %d", ret);
|
||||
zassert_true(ret >= 0, "recv error: %d", ret);
|
||||
|
||||
zassert_true(remaining_len >= ret, "More data then expected");
|
||||
check_data(data_buf, data_ptr, ret);
|
||||
|
|
Loading…
Reference in a new issue