diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-21 13:40:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 13:40:27 +0200 |
commit | 2bc398c3c4af0e3e7c821b81ba97d287246ed2ef (patch) | |
tree | 1bb05678fe57348b51e9ccc7cd5838bfaceef388 /babeld | |
parent | Merge pull request #4531 from donaldsharp/repeaty_mcrepeat (diff) | |
parent | ripngd: use MTYPE_STATIC (diff) | |
download | frr-2bc398c3c4af0e3e7c821b81ba97d287246ed2ef.tar.xz frr-2bc398c3c4af0e3e7c821b81ba97d287246ed2ef.zip |
Merge pull request #4573 from opensourcerouting/mtype_cleanup
MTYPE cleanup pass
Diffstat (limited to 'babeld')
-rw-r--r-- | babeld/babel_interface.c | 3 | ||||
-rw-r--r-- | babeld/babel_memory.c | 30 | ||||
-rw-r--r-- | babeld/babel_memory.h | 32 | ||||
-rw-r--r-- | babeld/babeld.c | 4 | ||||
-rw-r--r-- | babeld/subdir.am | 2 | ||||
-rw-r--r-- | babeld/util.h | 3 |
6 files changed, 8 insertions, 66 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index b84bc39cd..0eeb9b2bb 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -39,9 +39,10 @@ THE SOFTWARE. #include "neighbour.h" #include "route.h" #include "xroute.h" -#include "babel_memory.h" #include "babel_errors.h" +DEFINE_MTYPE_STATIC(BABELD, BABEL_IF, "Babel Interface") + #define IS_ENABLE(ifp) (babel_enable_if_lookup(ifp->name) >= 0) static int babel_enable_if_lookup (const char *ifname); diff --git a/babeld/babel_memory.c b/babeld/babel_memory.c deleted file mode 100644 index a10b7791e..000000000 --- a/babeld/babel_memory.c +++ /dev/null @@ -1,30 +0,0 @@ -/* babeld memory type definitions - * - * Copyright (C) 2017 Donald Sharp - * - * This file is part of FRR - * - * FRR 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. - * - * FRR 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "babel_memory.h" - -DEFINE_MGROUP(BABELD, "babeld") -DEFINE_MTYPE(BABELD, BABEL, "Babel Structure") -DEFINE_MTYPE(BABELD, BABEL_IF, "Babel Interface") diff --git a/babeld/babel_memory.h b/babeld/babel_memory.h deleted file mode 100644 index 428349889..000000000 --- a/babeld/babel_memory.h +++ /dev/null @@ -1,32 +0,0 @@ -/* babel memory type declarations - * - * Copyright (C) 2017 Donald Sharp - * - * This file is part of FRR. - * - * FRR 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. - * - * FRR 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 FRR; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -#ifndef _FRR_BABEL_MEMORY_H -#define _FRR_BABEL_MEMORY_H - -#include "memory.h" - -DECLARE_MGROUP(BABELD) -DECLARE_MTYPE(BABEL) -DECLARE_MTYPE(BABEL_IF) - -#endif /* _FRR_BABELD_MEMORY_H */ diff --git a/babeld/babeld.c b/babeld/babeld.c index 39451b435..6ad004a4a 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -43,9 +43,11 @@ THE SOFTWARE. #include "resend.h" #include "babel_filter.h" #include "babel_zebra.h" -#include "babel_memory.h" #include "babel_errors.h" +DEFINE_MGROUP(BABELD, "babeld") +DEFINE_MTYPE_STATIC(BABELD, BABEL, "Babel Structure") + static int babel_init_routing_process(struct thread *thread); static void babel_get_myid(void); static void babel_initial_noise(void); diff --git a/babeld/subdir.am b/babeld/subdir.am index 7081c730a..dd46675f2 100644 --- a/babeld/subdir.am +++ b/babeld/subdir.am @@ -17,7 +17,6 @@ babeld_libbabel_a_SOURCES = \ babeld/babel_errors.c \ babeld/babel_filter.c \ babeld/babel_interface.c \ - babeld/babel_memory.c \ babeld/babel_zebra.c \ babeld/babeld.c \ babeld/kernel.c \ @@ -36,7 +35,6 @@ noinst_HEADERS += \ babeld/babel_filter.h \ babeld/babel_interface.h \ babeld/babel_main.h \ - babeld/babel_memory.h \ babeld/babel_zebra.h \ babeld/babeld.h \ babeld/kernel.h \ diff --git a/babeld/util.h b/babeld/util.h index 7b836c2e4..00a025ff9 100644 --- a/babeld/util.h +++ b/babeld/util.h @@ -27,6 +27,9 @@ THE SOFTWARE. #include "babeld.h" #include "babel_main.h" #include "log.h" +#include "memory.h" + +DECLARE_MGROUP(BABELD) #if defined(i386) || defined(__mc68020__) || defined(__x86_64__) #define DO_NTOHS(_d, _s) do{ _d = ntohs(*(const unsigned short*)(_s)); }while(0) |