mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 21:58:22 +01:00
windows: match _cond_destroy logic w/return variable name
CloseHandle returns non-zero on success so earlier versions would leave 'ok' with a misleading value, though the return itself was correct. Change-Id: I21b74a59d90f7bf1b484a55f3960962e933f577b
This commit is contained in:
parent
206b686b39
commit
fdbe02c581
@ -75,10 +75,10 @@ static int pthread_mutex_destroy(pthread_mutex_t* const mutex) {
|
|||||||
// Condition
|
// Condition
|
||||||
static int pthread_cond_destroy(pthread_cond_t* const condition) {
|
static int pthread_cond_destroy(pthread_cond_t* const condition) {
|
||||||
int ok = 1;
|
int ok = 1;
|
||||||
ok &= (CloseHandle(condition->waiting_sem_) == 0);
|
ok &= (CloseHandle(condition->waiting_sem_) != 0);
|
||||||
ok &= (CloseHandle(condition->received_sem_) == 0);
|
ok &= (CloseHandle(condition->received_sem_) != 0);
|
||||||
ok &= (CloseHandle(condition->signal_event_) == 0);
|
ok &= (CloseHandle(condition->signal_event_) != 0);
|
||||||
return ok;
|
return !ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pthread_cond_init(pthread_cond_t* const condition, void* cond_attr) {
|
static int pthread_cond_init(pthread_cond_t* const condition, void* cond_attr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user