1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
8 * Helpers to check at runtime if a condition is true, and abort
18 * Abort if the condition is false.
20 * If expression is false this macro will prints an error message to
21 * standard error and terminates the program by calling abort(3).
24 * The expression to be checked.
26 * The format string, optionally followed by other arguments.
28 #define ec_assert_print(expr, args...) \
29 __ec_assert_print(expr, #expr, args)
32 void __ec_assert_print(bool expr, const char *expr_str,
33 const char *format, ...);