1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys: reduce RAM usage by expect on AVR

This commit is contained in:
Gunar Schorcht 2020-02-25 16:43:04 +01:00
parent defdf1e6f5
commit 9c726e7eb5

View File

@ -45,12 +45,10 @@ extern "C" {
*
* @param[in] file The file name of the file the expectation failed in
* @param[in] line The code line of @p file the expectation failed in
* @param[in] cond The failed condition as string
*/
NORETURN static inline void _expect_failure(const char *file, unsigned line,
const char *cond)
NORETURN static inline void _expect_failure(const char *file, unsigned line)
{
printf("%s:%u => failed condition \"%s\"\n", file, line, cond);
printf("%s:%u => failed condition\n", file, line);
core_panic(PANIC_EXPECT_FAIL, "CONDITION FAILED.");
}
@ -83,7 +81,7 @@ NORETURN static inline void _expect_failure(const char *file, unsigned line,
*
*/
#define expect(cond) ((cond) ? (void)0 : _expect_failure(RIOT_FILE_RELATIVE, \
__LINE__, #cond))
__LINE__))
#ifdef __cplusplus
}