tests: posix: common: remove duplicate call to pthread_attr_init
There was a second call to `pthread_attr_init()` that reallly had no sense being there. Also, it seems that there was a call to `pthread_attr_destroy()` out of perhaps paranoia. The duplicate call and `pthread_attr_destroy()` can be removed. Signed-off-by: Chris Friedt <cfriedt@meta.com>
This commit is contained in:
parent
20a05b6838
commit
d1e7ccec24
1 changed files with 1 additions and 5 deletions
|
@ -76,11 +76,7 @@ ZTEST(posix_apis, test_posix_mqueue)
|
|||
|
||||
for (i = 0; i < N_THR; i++) {
|
||||
/* Creating threads */
|
||||
if (pthread_attr_init(&attr[i]) != 0) {
|
||||
zassert_equal(pthread_attr_destroy(&attr[i]), 0);
|
||||
zassert_false(pthread_attr_init(&attr[i]),
|
||||
"pthread attr init failed");
|
||||
}
|
||||
zassert_ok(pthread_attr_init(&attr[i]));
|
||||
pthread_attr_setstack(&attr[i], &stacks[i][0], STACKSZ);
|
||||
|
||||
if (i % 2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue