Skip to content

Commit ffb1e63

Browse files
jukkarhenrikbrixandersen
authored andcommitted
tests: net: socketpair: Fix zassert_not_equal call
There was extra parameter when calling zassert_not_equal() which caused compilation warning. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 96dff2f commit ffb1e63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/net/socket/socketpair/src/nonblock.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ ZTEST_USER_F(net_socketpair, test_write_nonblock)
2020

2121
/* then set the O_NONBLOCK flag */
2222
res = zsock_fcntl(fixture->sv[i], F_GETFL, 0);
23-
zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno);
23+
zassert_not_equal(res, -1, "fcntl() %d failed: %d", i, errno);
2424

2525
res = zsock_fcntl(fixture->sv[i], F_SETFL, res | O_NONBLOCK);
26-
zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno);
26+
zassert_not_equal(res, -1, "fcntl() %d failed: %d", i, errno);
2727

2828
/* then, try to write one more byte */
2929
res = zsock_send(fixture->sv[i], "x", 1, 0);
@@ -41,10 +41,10 @@ ZTEST_USER_F(net_socketpair, test_read_nonblock)
4141
for (size_t i = 0; i < 2; ++i) {
4242
/* set the O_NONBLOCK flag */
4343
res = zsock_fcntl(fixture->sv[i], F_GETFL, 0);
44-
zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno);
44+
zassert_not_equal(res, -1, "fcntl() %d failed: %d", i, errno);
4545

4646
res = zsock_fcntl(fixture->sv[i], F_SETFL, res | O_NONBLOCK);
47-
zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno);
47+
zassert_not_equal(res, -1, "fcntl() %d failed: %d", i, errno);
4848

4949
/* then, try to read one byte */
5050
res = zsock_recv(fixture->sv[i], &c, 1, 0);

0 commit comments

Comments
 (0)