diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-04-19 04:32:56 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-04-28 18:32:23 -0400 |
commit | e21c03be6d51ed8ab94885b6829cd0e719778a1e (patch) | |
tree | d655f67e9040194998a2c93e423eb8bfd33b841e /lib/panic.c | |
parent | 4f1eed7527e256edd10fab85d2651a35e530509f (diff) | |
download | u-boot-e21c03be6d51ed8ab94885b6829cd0e719778a1e.zip u-boot-e21c03be6d51ed8ab94885b6829cd0e719778a1e.tar.gz u-boot-e21c03be6d51ed8ab94885b6829cd0e719778a1e.tar.bz2 |
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 <alex.kiernan@gmail.com>
Diffstat (limited to 'lib/panic.c')
-rw-r--r-- | lib/panic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/panic.c b/lib/panic.c index 0efa134..bae8a35 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); +} |