Skip to content

Commit

Permalink
simplify the check with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ducnguyen-sb committed Nov 1, 2023
1 parent 760d274 commit 1c71662
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,20 +1048,20 @@ int main(int argc, char **argv) {
goto err;
}

if (0 != pthread_mutexattr_init(&attr1)) {
if (pthread_mutexattr_init(&attr1)) {
goto err;
}
if (0 != pthread_mutexattr_init(&attr2)) {
if (pthread_mutexattr_init(&attr2)) {
goto err;
}

pthread_mutexattr_settype(&attr1, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_settype(&attr2, PTHREAD_MUTEX_RECURSIVE);

if (0 != pthread_mutex_init(test_sk_lock, &attr1)) {
if (pthread_mutex_init(test_sk_lock, &attr1)) {
goto err;
}
if (0 != pthread_mutex_init(test_sk_lock, &attr2)) {
if (pthread_mutex_init(test_sk_lock, &attr2)) {
goto err;
}

Expand Down

0 comments on commit 1c71662

Please sign in to comment.