Commit 6cf1c462 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add CHECK_OBJ_ORNULL() macro


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1981 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8b84fee4
......@@ -23,6 +23,12 @@
assert((ptr)->magic == type_magic); \
} while (0)
#define CHECK_OBJ_ORNULL(ptr, type_magic) \
do { \
if ((ptr) != NULL) \
assert((ptr)->magic == type_magic); \
} while (0)
#define CAST_OBJ(to, from, type_magic) \
do { \
(to) = (from); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment