Commit 648a0857 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

panic: Bring back PAN_CheckMagic()

It turns out we still need it in a couple places.
parent b6118c3b
......@@ -375,6 +375,14 @@ int PAN__DumpStruct(struct vsb *vsb, int block, int track, const void *ptr,
const char *smagic, unsigned magic, const char *fmt, ...)
v_printflike_(7,8);
#define PAN_CheckMagic(vsb, ptr, exp) \
do { \
if ((ptr)->magic != (exp)) \
VSB_printf((vsb), \
"MAGIC at %p is 0x%08x (Should be: %s/0x%08x)\n", \
ptr, (ptr)->magic, #exp, exp); \
} while(0)
#define PAN_dump_struct(vsb, ptr, magic, ...) \
PAN__DumpStruct(vsb, 1, 1, ptr, #magic, magic, __VA_ARGS__)
......
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