Define BUG_ON and WARN_ON as assert for easy debugging.
Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
#include <string.h>
#include <endian.h>
#include <byteswap.h>
+#include <assert.h>
#ifndef READ
#define READ 0
#define kstrdup(x, y) strdup(x)
#define kfree(x) free(x)
-#define BUG_ON(c) do { if (c) abort(); } while (0)
-#define WARN_ON(c) do { if (c) abort(); } while (0)
+#define BUG_ON(c) assert(!(c))
+#define WARN_ON(c) assert(!(c))
#undef offsetof
#ifdef __compiler_offsetof