summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index b49850d23..f49989f7e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -186,10 +186,10 @@ typedef void (*git_refcount_freeptr)(void *r);
}
#define GIT_REFCOUNT_OWN(r, o) { \
- (r)->rc.owner = o; \
+ (void)git__swap((r)->rc.owner, o); \
}
-#define GIT_REFCOUNT_OWNER(r) ((r)->rc.owner)
+#define GIT_REFCOUNT_OWNER(r) git__load((r)->rc.owner)
#define GIT_REFCOUNT_VAL(r) git_atomic_get((r)->rc.refcount)