Conversation
lib/vtls/mbedtls_threadlock.c
Outdated
There was a problem hiding this comment.
👍, nice catch. It does beg the question though, shouldn't we just shorten it to:
if (pthread_mutex_init(&mutex_buf[i], NULL))
return 0;..to increase readability?
There was a problem hiding this comment.
For consistency it would then be nice to eliminate all the ret variables in the file as none of them is used besides for checking call result. Should I update the pull request?
There was a problem hiding this comment.
For consistency it would then be nice to eliminate all the ret variables in the file as none of them is used besides for checking call result. Should I update the pull request?
ok
There was a problem hiding this comment.
That would be great, let's see what that changeset would look like.
There was a problem hiding this comment.
I have updated the pull request with the suggested changes
Update mbedtls_threadlock.c
3ea62d6 to
60d655e
Compare
|
Thanks! |
Variable ret is only used in case of USE_THREADS_POSIX. Other cases will issue a warning about unused variable.