[debug] allow build system to provide custom file name (#2706)

This commit is contained in:
Jonathan Hui
2018-05-15 15:45:13 -07:00
committed by GitHub
parent 5659668aca
commit 727b8fa2fa
+18 -10
View File
@@ -58,16 +58,24 @@
#include "openthread/platform/misc.h"
#define assert(cond) \
do \
{ \
if (!(cond)) \
{ \
otPlatAssertFail(__FILE__, __LINE__); \
while (1) \
{ \
} \
} \
/**
* Allow the build system to provide a custom file name.
*
*/
#ifndef FILE_NAME
#define FILE_NAME __FILE__
#endif
#define assert(cond) \
do \
{ \
if (!(cond)) \
{ \
otPlatAssertFail(FILE_NAME, __LINE__); \
while (1) \
{ \
} \
} \
} while (0)
#else