diff options
| author | Shawn O. Pearce <spearce@spearce.org> | 2009-01-02 21:41:52 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2009-01-02 21:41:52 -0800 |
| commit | 11bb049bdddf1d203dfe8fd6031c4dba328a7525 (patch) | |
| tree | 62860787aba2b59b1dd0bb7b9a810fbf3428cf75 /src/thread-utils.h | |
| parent | b438016ecda7648426036e66c4ed17fc93e71cfa (diff) | |
| download | libgit2-11bb049bdddf1d203dfe8fd6031c4dba328a7525.tar.gz | |
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>
Diffstat (limited to 'src/thread-utils.h')
| -rw-r--r-- | src/thread-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index f5a98ad91..f8ed08a88 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -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. */ |
