diff options
author | David Lamparter <equinox@diac24.net> | 2021-03-16 10:54:51 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-04-23 12:06:35 +0200 |
commit | 6a0eb6885b80260294673078dc97eb47b9ad753f (patch) | |
tree | 15989b8d64d73c91321ceeb1d4f455b440b3fee7 | |
parent | *: make sure `config.h` or `zebra.h` is first (diff) | |
download | frr-6a0eb6885b80260294673078dc97eb47b9ad753f.tar.xz frr-6a0eb6885b80260294673078dc97eb47b9ad753f.zip |
*: drop zassert.h
It's not actually working properly...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | bgpd/bgp_io.c | 1 | ||||
-rw-r--r-- | lib/clippy.c | 5 | ||||
-rw-r--r-- | lib/log.h | 2 | ||||
-rw-r--r-- | lib/subdir.am | 1 | ||||
-rw-r--r-- | lib/zassert.h | 45 | ||||
-rw-r--r-- | lib/zebra.h | 2 | ||||
-rw-r--r-- | lib/zlog.h | 2 | ||||
-rw-r--r-- | nhrpd/zbuf.c | 2 | ||||
-rw-r--r-- | nhrpd/zbuf.h | 1 | ||||
-rw-r--r-- | tests/lib/cxxcompat.c | 1 | ||||
-rw-r--r-- | zebra/zserv.c | 1 |
11 files changed, 4 insertions, 59 deletions
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c index c2d8cae58..9ab426e90 100644 --- a/bgpd/bgp_io.c +++ b/bgpd/bgp_io.c @@ -32,7 +32,6 @@ #include "stream.h" // for stream_get_endp, stream_getw_from, str... #include "ringbuf.h" // for ringbuf_remain, ringbuf_peek, ringbuf_... #include "thread.h" // for THREAD_OFF, THREAD_ARG, thread... -#include "zassert.h" // for assert #include "bgpd/bgp_io.h" #include "bgpd/bgp_debug.h" // for bgp_debug_neighbor_events, bgp_type_str diff --git a/lib/clippy.c b/lib/clippy.c index 6223697ae..f1923d2a5 100644 --- a/lib/clippy.c +++ b/lib/clippy.c @@ -106,12 +106,7 @@ int main(int argc, char **argv) /* and now for the ugly part... provide simplified logging functions so we * don't need to link libzebra (which would be a circular build dep) */ -#ifdef __ASSERT_FUNCTION -#undef __ASSERT_FUNCTION -#endif - #include "log.h" -#include "zassert.h" void vzlogx(const struct xref_logmsg *xref, int prio, const char *format, va_list args) @@ -22,8 +22,6 @@ #ifndef _ZEBRA_LOG_H #define _ZEBRA_LOG_H -#include "zassert.h" - #include <syslog.h> #include <stdint.h> #include <stdbool.h> diff --git a/lib/subdir.am b/lib/subdir.am index 98ba1cf24..fcaae9628 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -278,7 +278,6 @@ pkginclude_HEADERS += \ lib/yang.h \ lib/yang_translator.h \ lib/yang_wrappers.h \ - lib/zassert.h \ lib/zclient.h \ lib/zebra.h \ lib/zlog.h \ diff --git a/lib/zassert.h b/lib/zassert.h deleted file mode 100644 index 527282c4f..000000000 --- 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 */ diff --git a/lib/zebra.h b/lib/zebra.h index 26c0fe05b..3b624117d 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -206,7 +206,7 @@ #define __attribute__(x) #endif /* !__GNUC__ || VTYSH_EXTRACT_PL */ -#include "zassert.h" +#include <assert.h> /* * Add explicit static cast only when using a C++ compiler. diff --git a/lib/zlog.h b/lib/zlog.h index 66d8f1e5d..c1b61ceaa 100644 --- a/lib/zlog.h +++ b/lib/zlog.h @@ -25,6 +25,8 @@ #include <unistd.h> #include <sys/uio.h> +#include <assert.h> + #include "atomlist.h" #include "frrcu.h" #include "memory.h" diff --git a/nhrpd/zbuf.c b/nhrpd/zbuf.c index 43ce97481..e3d9d042c 100644 --- a/nhrpd/zbuf.c +++ b/nhrpd/zbuf.c @@ -14,7 +14,7 @@ #include <string.h> #include <unistd.h> #include <errno.h> -#include "zassert.h" +#include <assert.h> #include "zbuf.h" #include "memory.h" #include "nhrpd.h" diff --git a/nhrpd/zbuf.h b/nhrpd/zbuf.h index d4a7c15a9..2741860bf 100644 --- a/nhrpd/zbuf.h +++ b/nhrpd/zbuf.h @@ -15,7 +15,6 @@ #include <endian.h> #include <sys/types.h> -#include "zassert.h" #include "list.h" struct zbuf { diff --git a/tests/lib/cxxcompat.c b/tests/lib/cxxcompat.c index fde0d6af5..2589fca61 100644 --- a/tests/lib/cxxcompat.c +++ b/tests/lib/cxxcompat.c @@ -104,7 +104,6 @@ #include "lib/yang.h" #include "lib/yang_translator.h" #include "lib/yang_wrappers.h" -#include "lib/zassert.h" #include "lib/zclient.h" PREDECL_RBTREE_UNIQ(footree); diff --git a/zebra/zserv.c b/zebra/zserv.c index f89b6fe47..0bf4d8ece 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -50,7 +50,6 @@ #include "lib/thread.h" /* for thread (ptr only), THREAD_ARG, ... */ #include "lib/vrf.h" /* for vrf_info_lookup, VRF_DEFAULT */ #include "lib/vty.h" /* for vty_out, vty (ptr only) */ -#include "lib/zassert.h" /* for assert */ #include "lib/zclient.h" /* for zmsghdr, ZEBRA_HEADER_SIZE, ZEBRA... */ #include "lib/frr_pthread.h" /* for frr_pthread_new, frr_pthread_stop... */ #include "lib/frratomic.h" /* for atomic_load_explicit, atomic_stor... */ |