Commit 11bb049b by Shawn O. Pearce

Fix pthread_mutex based gitrc_dec

The function should return true only when the counter drops to 0.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
parent b438016e
......@@ -57,7 +57,7 @@ GIT_INLINE(int) gitrc_dec(git_refcnt *p)
gitlck_lock(&p->lock);
c = --p->counter;
gitlck_unlock(&p->lock);
return !!c;
return !c;
}
/** Free any resources associated with the counter. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment