summaryrefslogtreecommitdiff
path: root/src/oidmap.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-01-27 14:20:24 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-17 11:41:06 +0100
commit73028af85c11bd947184a73c1e2d7902819695b2 (patch)
tree5be249b035620603b70dbe1e321a28f87ff4b7ea /src/oidmap.h
parent85d2748c6f75bd810c7376647c8ae32984b5e3bb (diff)
downloadlibgit2-73028af85c11bd947184a73c1e2d7902819695b2.tar.gz
khash: avoid using macro magic to get return address
Diffstat (limited to 'src/oidmap.h')
-rw-r--r--src/oidmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/oidmap.h b/src/oidmap.h
index e736a516b..0a144361a 100644
--- a/src/oidmap.h
+++ b/src/oidmap.h
@@ -48,9 +48,9 @@ GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
#define git_oidmap_put(h, k, err) kh_put(oid, h, k, err)
#define git_oidmap_insert(h, key, val, rval) do { \
- khiter_t __pos = kh_put(oid, h, key, &rval); \
- if (rval >= 0) { \
- if (rval == 0) kh_key(h, __pos) = key; \
+ khiter_t __pos = kh_put(oid, h, key, rval); \
+ if ((*rval) >= 0) { \
+ if ((*rval) == 0) kh_key(h, __pos) = key; \
kh_val(h, __pos) = val; \
} } while (0)