Commit 494da896 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Add a VALID_OBJ() predicate macro.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2253 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8a719c74
......@@ -12,6 +12,9 @@
free(to); \
} while (0)
#define VALID_OBJ(ptr, type_magic) \
((ptr) != NULL && (ptr)->magic == (type_magic))
#define CHECK_OBJ(ptr, type_magic) \
do { \
assert((ptr)->magic == type_magic); \
......
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