From e21c03be6d51ed8ab94885b6829cd0e719778a1e Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 19 Apr 2018 04:32:56 +0000 Subject: Consolidate __assert_failed into one implementation We had two implementations of __assert_failed which were almost identical, combine them into one. Signed-off-by: Alex Kiernan --- lib/panic.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/panic.c') diff --git a/lib/panic.c b/lib/panic.c index 0efa134344..bae8a35935 100644 --- a/lib/panic.c +++ b/lib/panic.c @@ -45,3 +45,11 @@ void panic(const char *fmt, ...) #endif panic_finish(); } + +void __assert_fail(const char *assertion, const char *file, unsigned int line, + const char *function) +{ + /* This will not return */ + panic("%s:%u: %s: Assertion `%s' failed.", file, line, function, + assertion); +} -- cgit v1.2.3