Use a boolean expression for refcount check, fixes refcounting if bool is a signed char
This commit is contained in:
parent
5f47296f22
commit
21f411b861
|
@ -287,7 +287,7 @@ bool ref_put(refcount_t *ref)
|
|||
bool more_refs;
|
||||
|
||||
pthread_mutex_lock(&ref_mutex);
|
||||
more_refs = --(*ref);
|
||||
more_refs = --(*ref) > 0;
|
||||
pthread_mutex_unlock(&ref_mutex);
|
||||
return !more_refs;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue