summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_debug.c2
-rw-r--r--ripngd/ripng_interface.c22
-rw-r--r--ripngd/ripng_peer.c6
-rw-r--r--ripngd/ripng_zebra.c2
-rw-r--r--ripngd/ripngd.c5
5 files changed, 18 insertions, 19 deletions
diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c
index 4ed4fa36..78f13a71 100644
--- a/ripngd/ripng_debug.c
+++ b/ripngd/ripng_debug.c
@@ -204,7 +204,7 @@ DEFUN (no_debug_ripng_zebra,
}
/* Debug node. */
-struct cmd_node debug_node =
+static struct cmd_node debug_node =
{
DEBUG_NODE,
"", /* Debug node has no interface. */
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index d76e3a13..ae0ba9b5 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -243,8 +243,9 @@ ripng_interface_up (int command, struct zclient *zclient, zebra_size_t length)
return 0;
if (IS_RIPNG_DEBUG_ZEBRA)
- zlog_debug ("interface up %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6);
+ zlog_debug ("interface up %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu6);
/* Check if this interface is RIPng enabled or not. */
ripng_enable_apply (ifp);
@@ -276,8 +277,9 @@ ripng_interface_down (int command, struct zclient *zclient,
ripng_if_down (ifp);
if (IS_RIPNG_DEBUG_ZEBRA)
- zlog_debug ("interface down %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6);
+ zlog_debug ("interface down %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu6);
return 0;
}
@@ -291,8 +293,9 @@ ripng_interface_add (int command, struct zclient *zclient, zebra_size_t length)
ifp = zebra_interface_add_read (zclient->ibuf);
if (IS_RIPNG_DEBUG_ZEBRA)
- zlog_debug ("RIPng interface add %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6);
+ zlog_debug ("RIPng interface add %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu6);
/* Check is this interface is RIP enabled or not.*/
ripng_enable_apply (ifp);
@@ -324,8 +327,9 @@ ripng_interface_delete (int command, struct zclient *zclient,
ripng_if_down(ifp);
}
- zlog_info("interface delete %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6);
+ zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu6);
/* To support pseudo interface do not free interface structure. */
/* if_delete(ifp); */
@@ -1200,7 +1204,7 @@ interface_config_write (struct vty *vty)
}
/* ripngd's interface node. */
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
{
INTERFACE_NODE,
"%s(config-if)# ",
diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c
index 1e58bb87..c04456b8 100644
--- a/ripngd/ripng_peer.c
+++ b/ripngd/ripng_peer.c
@@ -42,11 +42,7 @@ struct list *peer_list;
static struct ripng_peer *
ripng_peer_new (void)
{
- struct ripng_peer *new;
-
- new = XMALLOC (MTYPE_RIPNG_PEER, sizeof (struct ripng_peer));
- memset (new, 0, sizeof (struct ripng_peer));
- return new;
+ return XCALLOC (MTYPE_RIPNG_PEER, sizeof (struct ripng_peer));
}
static void
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 62185c0a..4c444550 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -538,7 +538,7 @@ zebra_config_write (struct vty *vty)
}
/* Zebra node structure. */
-struct cmd_node zebra_node =
+static struct cmd_node zebra_node =
{
ZEBRA_NODE,
"%s(config-router)# ",
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 5e9bfc54..9deac032 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1820,8 +1820,7 @@ ripng_create (void)
assert (ripng == NULL);
/* Allocaste RIPng instance. */
- ripng = XMALLOC (MTYPE_RIPNG, sizeof (struct ripng));
- memset (ripng, 0, sizeof (struct ripng));
+ ripng = XCALLOC (MTYPE_RIPNG, sizeof (struct ripng));
/* Default version and timer values. */
ripng->version = RIPNG_V1;
@@ -2683,7 +2682,7 @@ ripng_config_write (struct vty *vty)
}
/* RIPng node structure. */
-struct cmd_node cmd_ripng_node =
+static struct cmd_node cmd_ripng_node =
{
RIPNG_NODE,
"%s(config-router)# ",