summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@users.sourceforge.jp>2009-12-16 04:08:36 +0900
committerfrsyuki <frsyuki@users.sourceforge.jp>2009-12-16 04:08:36 +0900
commit686e8ca0f004004f4b8e10438fe91a48a95e6ff9 (patch)
tree472d224034a5b0e0abbe472296f5fe97a5104b13
parent5aa47d667783476277409b06d5829322a801df05 (diff)
downloadmsgpack-python-686e8ca0f004004f4b8e10438fe91a48a95e6ff9.tar.gz
c,cpp: fix unpacker
-rw-r--r--c/unpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/unpack.c b/c/unpack.c
index 6a435ba..d5bcb2d 100644
--- a/c/unpack.c
+++ b/c/unpack.c
@@ -152,7 +152,7 @@ static inline void init_count(void* buffer)
static inline void decl_count(void* buffer)
{
// atomic if(--*(_msgpack_atomic_counter_t*)buffer == 0) { free(buffer); }
- if(_msgpack_sync_decr_and_fetch((volatile _msgpack_atomic_counter_t*)buffer)) {
+ if(_msgpack_sync_decr_and_fetch((volatile _msgpack_atomic_counter_t*)buffer) == 0) {
free(buffer);
}
}