misc/assert: remove const string from assert expression

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-02 11:05:56 +08:00
committed by Xiang Xiao
parent 247b050e5f
commit dff2192c75
2 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -43,7 +43,7 @@
#undef DEBUGVERIFY /* Like VERIFY, but only if CONFIG_DEBUG_ASSERTIONS is defined */
#ifndef CONFIG_HAVE_FILENAME
# define __FILE__ "unknown"
# define __FILE__ NULL
# define __LINE__ 0
#endif
@@ -53,8 +53,8 @@
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, #f); } while (0)
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, #f); } while (0)
#else
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, "unknown"); } while (0)
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, "unknown"); } while (0)
#define ASSERT(f) do { if (!(f)) __assert(__FILE__, __LINE__, NULL); } while (0)
#define VERIFY(f) do { if ((f) < 0) __assert(__FILE__, __LINE__, NULL); } while (0)
#endif
#ifdef CONFIG_DEBUG_ASSERTIONS