]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: drop zassert.h
authorDavid Lamparter <equinox@diac24.net>
Tue, 16 Mar 2021 09:54:51 +0000 (10:54 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 23 Apr 2021 10:06:35 +0000 (12:06 +0200)
It's not actually working properly...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_io.c
lib/clippy.c
lib/log.h
lib/subdir.am
lib/zassert.h [deleted file]
lib/zebra.h
lib/zlog.h
nhrpd/zbuf.c
nhrpd/zbuf.h
tests/lib/cxxcompat.c
zebra/zserv.c

index c2d8cae580d241b252e1524b1e01798a58370369..9ab426e90c42b1b5463dde68165ae802b2bfd9ff 100644 (file)
@@ -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
index 6223697ae98589db84fe2723c1d5bb7f1e7e86f9..f1923d2a5629ab3d6a474bcae701f8d2bc97e171 100644 (file)
@@ -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)
index 714725364451770b50f05984c76ab5d57c5f5e35..59f1742d01e16acaa79277a19f8c58b276dd503a 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
@@ -22,8 +22,6 @@
 #ifndef _ZEBRA_LOG_H
 #define _ZEBRA_LOG_H
 
-#include "zassert.h"
-
 #include <syslog.h>
 #include <stdint.h>
 #include <stdbool.h>
index 98ba1cf24c3b289e17a44f9c2dda89a90593f340..fcaae9628a581a013cbeb323c39bd26d988d6284 100644 (file)
@@ -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 (file)
index 527282c..0000000
+++ /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 */
index 26c0fe05b57871040e3e97fb96411ac1515de910..3b624117de769cbd45ae0c3a3e96389e30bc3485 100644 (file)
 #define __attribute__(x)
 #endif /* !__GNUC__ || VTYSH_EXTRACT_PL */
 
-#include "zassert.h"
+#include <assert.h>
 
 /*
  * Add explicit static cast only when using a C++ compiler.
index 66d8f1e5d73f2eb22e22a3f54aed125fd6efb91e..c1b61ceaa68641d91af2b1aba77c56d304d5ef4d 100644 (file)
@@ -25,6 +25,8 @@
 #include <unistd.h>
 #include <sys/uio.h>
 
+#include <assert.h>
+
 #include "atomlist.h"
 #include "frrcu.h"
 #include "memory.h"
index 43ce974817986c52656bdff848e943264f98a6e6..e3d9d042c5790246e0e8cc7af43ddd7c7d2d4e3c 100644 (file)
@@ -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"
index d4a7c15a95a07a49fb2a26c23a6f0589946cee77..2741860bfd6d8dfdd73a8fea8ca307104c3cb4f6 100644 (file)
@@ -15,7 +15,6 @@
 #include <endian.h>
 #include <sys/types.h>
 
-#include "zassert.h"
 #include "list.h"
 
 struct zbuf {
index fde0d6af520f63a8a1503a67e6e5c9388927be97..2589fca6141b92c05886db739a3c5f496feb43a9 100644 (file)
 #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);
index f89b6fe478313ebca5439705b35b3dace1a0af59..0bf4d8ece298eb1ee0368bb436f42bc287179557 100644 (file)
@@ -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... */