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:
James Zern 2011-09-09 06:04:05 +00:00
parent 206b686b39
commit fdbe02c581

View File

@ -75,10 +75,10 @@ static int pthread_mutex_destroy(pthread_mutex_t* const mutex) {
// Condition
static int pthread_cond_destroy(pthread_cond_t* const condition) {
int ok = 1;
ok &= (CloseHandle(condition->waiting_sem_) == 0);
ok &= (CloseHandle(condition->received_sem_) == 0);
ok &= (CloseHandle(condition->signal_event_) == 0);
return ok;
ok &= (CloseHandle(condition->waiting_sem_) != 0);
ok &= (CloseHandle(condition->received_sem_) != 0);
ok &= (CloseHandle(condition->signal_event_) != 0);
return !ok;
}
static int pthread_cond_init(pthread_cond_t* const condition, void* cond_attr) {