Loading...
Searching...
No Matches
assert.h
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
*/
#pragma once
#include <stdbool.h>
#define ec_assert_print(expr, args...) __ec_assert_print(expr, #expr, args)
void __ec_assert_print(bool expr, const char *expr_str, const char *format, ...);
#define EC_CHECK_ARG(cond, ret, err) \
do { \
if (!(cond)) { \
errno = err; \
return ret; \
} \
} while (0)