Skip to content

Commit 12ed08a

Browse files
cfriedtjgl-meta
authored andcommitted
tests: posix: pthread: remove unused pthread return value
Rather than pass an variable address to a `void *` in `pthread_join()` and do nothing with it, just pass `NULL`. Signed-off-by: Christopher Friedt <[email protected]>
1 parent 7c17bda commit 12ed08a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/posix/common/src/pthread.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,6 @@ ZTEST(posix_apis, test_posix_pthread_create_negative)
584584

585585
ZTEST(posix_apis, test_pthread_descriptor_leak)
586586
{
587-
void *unused;
588587
pthread_t pthread1;
589588
pthread_attr_t attr;
590589

@@ -594,7 +593,7 @@ ZTEST(posix_apis, test_pthread_descriptor_leak)
594593
zassert_ok(pthread_attr_setstack(&attr, &stack_e[0][0], STACKS));
595594
zassert_ok(pthread_create(&pthread1, &attr, create_thread1, NULL),
596595
"unable to create thread %zu", i);
597-
zassert_ok(pthread_join(pthread1, &unused), "unable to join thread %zu", i);
596+
zassert_ok(pthread_join(pthread1, NULL), "unable to join thread %zu", i);
598597
}
599598
}
600599

0 commit comments

Comments
 (0)