File: assert_override.h

package info (click to toggle)
bpfilter 0.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,076 kB
  • sloc: ansic: 30,397; sh: 1,383; cpp: 959; python: 495; yacc: 385; lex: 194; makefile: 9
file content (14 lines) | stat: -rw-r--r-- 486 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2023 Meta Platforms, Inc. and affiliates.
 */

extern void mock_assert(const int result, const char * const expression,
                        const char * const file, const int line);

#ifndef bf_assert
#define bf_assert(expression)                                                  \
    mock_assert((int)(!!(expression)), #expression, __FILE__, __LINE__)
#else
#error bf_assert is already defined, it should not
#endif