From 4ee2938e37ae6668724ac29b593cffa654d7bfa4 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 10 Apr 2014 13:13:24 -0400 Subject: Don't check for NULL in DMNSN_INCREF(). --- libdimension/dimension/refcount.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'libdimension/dimension') 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) -- cgit v1.2.3