diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-15 21:58:30 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-19 20:21:42 -0700 |
commit | b307a7038fed1afa52fc9b246bab61d1af2ed2ec (patch) | |
tree | edd9e4006481cbd5d376598713a73ab8935fb84d | |
parent | 8f0b3cd60bd9c41245aba9308efd26f4672e5395 (diff) |
libmisc: assert: Change global to be static
-rw-r--r-- | libmisc/assert.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libmisc/assert.c b/libmisc/assert.c index 3f4df47..911cea3 100644 --- a/libmisc/assert.c +++ b/libmisc/assert.c @@ -11,13 +11,11 @@ #include <libmisc/assert.h> #ifndef NDEBUG - -static bool in_fail = false; - __attribute__((noreturn, weak)) void __assert_msg_fail(const char *expr, const char *file, unsigned int line, const char *func, const char *msg) { + static bool in_fail = false; if (!in_fail) { in_fail = true; printf("error: %s:%u:%s(): assertion \"%s\" failed%s%s\n", @@ -27,5 +25,4 @@ void __assert_msg_fail(const char *expr, } abort(); } - #endif |