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.c2
-rw-r--r--ripngd/ripng_main.c3
-rw-r--r--ripngd/ripng_peer.c6
-rw-r--r--ripngd/ripng_zebra.c2
-rw-r--r--ripngd/ripngd.c5
-rw-r--r--ripngd/ripngd.conf.sample2
7 files changed, 9 insertions, 13 deletions
diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c
index 7841fe21..aac254d4 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 cad6240b..06df6a10 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -1205,7 +1205,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_main.c b/ripngd/ripng_main.c
index 70553910..a18ce9de 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -240,7 +240,8 @@ main (int argc, char **argv)
break;
}
vty_port = atoi (optarg);
- vty_port = (vty_port ? vty_port : RIPNG_VTY_PORT);
+ if (vty_port <= 0 || vty_port > 0xffff)
+ vty_port = RIPNG_VTY_PORT;
break;
case 'r':
retain_mode = 1;
diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c
index 34f5ac6c..0438b4bf 100644
--- a/ripngd/ripng_peer.c
+++ b/ripngd/ripng_peer.c
@@ -42,11 +42,7 @@ struct list *peer_list;
struct ripng_peer *
ripng_peer_new ()
{
- 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));
}
void
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 1f9bee0c..c624454e 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 a8277fe2..9bf40dff 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1820,8 +1820,7 @@ ripng_create ()
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;
@@ -2685,7 +2684,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)# ",
diff --git a/ripngd/ripngd.conf.sample b/ripngd/ripngd.conf.sample
index 1daf3b39..ad673e57 100644
--- a/ripngd/ripngd.conf.sample
+++ b/ripngd/ripngd.conf.sample
@@ -2,7 +2,7 @@
!
! RIPngd sample configuration file
!
-! $Id$
+! $Id: ripngd.conf.sample,v 1.1 2002/12/13 20:15:30 paul Exp $
!
hostname ripngd
password zebra