Skip to content

Commit

Permalink
Review: compare WaitForSingleObject result non-success case
Browse files Browse the repository at this point in the history
Co-authored-by: Antonin Décimo <antonin.decimo@gmail.com>
  • Loading branch information
jmid and MisterDA authored Apr 18, 2024
1 parent b360352 commit 217db5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flexdll.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void *flexdll_dlsym(void *u, const char *name) {
err = get_tls_error(TLS_ERROR_NOP);
if (err == NULL) return NULL;

if (WaitForSingleObject(units_mutex, INFINITE) == WAIT_FAILED) {
if (WaitForSingleObject(units_mutex, INFINITE) == WAIT_OBJECT_0) {
if (!err->code) err->code = 1;
return NULL;
}
Expand Down

0 comments on commit 217db5d

Please sign in to comment.