summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/refcount.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-04-10 13:13:24 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-04-10 13:13:24 -0400
commit4ee2938e37ae6668724ac29b593cffa654d7bfa4 (patch)
tree2191c6407fcfdcaedbf836cd264083bc498111b3 /libdimension/dimension/refcount.h
parent6d47e389213b086c1d920e1120b4b2bac05903f2 (diff)
downloaddimension-4ee2938e37ae6668724ac29b593cffa654d7bfa4.tar.xz
Don't check for NULL in DMNSN_INCREF().
Diffstat (limited to 'libdimension/dimension/refcount.h')
-rw-r--r--libdimension/dimension/refcount.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/libdimension/dimension/refcount.h b/libdimension/dimension/refcount.h
index 337147f..d0f688e 100644
--- a/libdimension/dimension/refcount.h
+++ b/libdimension/dimension/refcount.h
@@ -33,11 +33,4 @@
* Increment a reference count.
* @param[in,out] object The reference-counted object to acquire.
*/
-#define DMNSN_INCREF(object) \
- do { \
- /* Suppress "address will always evaluate to true" warning */ \
- void *testptr = (object); \
- if (testptr) { \
- ++(object)->DMNSN_REFCOUNT_FIELD; \
- } \
- } while (0)
+#define DMNSN_INCREF(object) (++(object)->DMNSN_REFCOUNT_FIELD)