dlmalloc compiles errors with clang
[vpp.git] / src / vppinfra / dlmalloc.c
index 1bc8f65..1b4d226 100644 (file)
@@ -1612,7 +1612,11 @@ static size_t traverse_and_check(mstate m);
 
 #if (FOOTERS && !INSECURE)
 /* Check if (alleged) mstate m has expected magic field */
-#define ok_magic(M)      ((M)->magic == mparams.magic)
+static inline int
+ok_magic (const mstate m)
+{
+    return (m->magic == mparams.magic);
+}
 #else  /* (FOOTERS && !INSECURE) */
 #define ok_magic(M)      (1)
 #endif /* (FOOTERS && !INSECURE) */