Skip to content

Commit 6ff504c

Browse files
Use MBED_FILENAME instead of __FILE__ in MBED_ASSERT
To actually get the filename in the error reporting struct instead of the start of the path, let's use the MBED_FILENAME macro that MBED_ERROR et al uses.
1 parent 26876c0 commit 6ff504c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/include/platform/mbed_assert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ MBED_NORETURN void mbed_assert_internal(const char *expr, const char *file, int
6666
#define MBED_ASSERT(expr) \
6767
do { \
6868
if (!(expr)) { \
69-
mbed_assert_internal(#expr, __FILE__, __LINE__); \
69+
mbed_assert_internal(#expr, MBED_FILENAME, __LINE__); \
7070
} \
7171
} while (0)
7272
#endif

0 commit comments

Comments
 (0)