Skip to content

Commit

Permalink
babeld: use MTYPE_STATIC
Browse files Browse the repository at this point in the history
Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Jun 21, 2019
1 parent c1344b5 commit 8b7454e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 66 deletions.
3 changes: 2 additions & 1 deletion babeld/babel_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
30 changes: 0 additions & 30 deletions babeld/babel_memory.c

This file was deleted.

32 changes: 0 additions & 32 deletions babeld/babel_memory.h

This file was deleted.

4 changes: 3 additions & 1 deletion babeld/babeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions babeld/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions babeld/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8b7454e

Please sign in to comment.