diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-05-03 11:17:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-03 11:17:36 -0400 |
| commit | f71e1ff6a98d0e244c7da11d870d14e31b517811 (patch) | |
| tree | 0657d1718fa1018c0e8aa3bea76266f9dd6677ad /lib/zassert.h | |
| parent | 92046e65409fe0ba2935e886cfb778253d5d8d4e (diff) | |
| parent | 4f1a6d98da0703b066a1ae92dcac7c8f6ae3b1e6 (diff) | |
Merge pull request #8545 from opensourcerouting/assert-our-own
*: make our own assert() actually work
Diffstat (limited to 'lib/zassert.h')
| -rw-r--r-- | lib/zassert.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/zassert.h b/lib/zassert.h deleted file mode 100644 index 527282c4f2..0000000000 --- a/lib/zassert.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Quagga. - * - * Quagga is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * Quagga is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; see the file COPYING; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef _QUAGGA_ASSERT_H -#define _QUAGGA_ASSERT_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern void _zlog_assert_failed(const char *assertion, const char *file, - unsigned int line, const char *function) - __attribute__((noreturn)); - -#undef __ASSERT_FUNCTION -#define __ASSERT_FUNCTION __func__ - -#define zassert(EX) \ - ((void)((EX) ? 0 : (_zlog_assert_failed(#EX, __FILE__, __LINE__, \ - __ASSERT_FUNCTION), \ - 0))) - -#undef assert -#define assert(EX) zassert(EX) - -#ifdef __cplusplus -} -#endif - -#endif /* _QUAGGA_ASSERT_H */ |
