summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ChangeLog4
-rw-r--r--ripngd/ripng_interface.c20
-rw-r--r--ripngd/ripng_offset.c16
-rw-r--r--ripngd/ripng_routemap.c22
-rw-r--r--ripngd/ripng_zebra.c2
-rw-r--r--ripngd/ripngd.c2
6 files changed, 36 insertions, 30 deletions
diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog
index 8fb577b6..1375b256 100644
--- a/ripngd/ChangeLog
+++ b/ripngd/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-11 Hasso Tepper <hasso at quagga.net>
+
+ * *.c: Make more strings const.
+
2004-10-08 Hasso Tepper <hasso at quagga.net>
* *.[c|h]: Fix compiler warnings: make strings const, signed ->
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index eb9005c3..f5467f97 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -52,7 +52,7 @@ extern struct zebra_privs_t ripngd_privs;
/* Static utility function. */
static void ripng_enable_apply (struct interface *);
static void ripng_passive_interface_apply (struct interface *);
-int ripng_enable_if_lookup (char *ifname);
+int ripng_enable_if_lookup (const char *ifname);
int ripng_enable_network_lookup2 (struct connected *connected);
void ripng_enable_apply_all ();
@@ -155,12 +155,12 @@ ripng_if_ipv6_lladdress_check (struct interface *ifp)
}
/* Check max mtu size. */
-int
+unsigned int
ripng_check_max_mtu ()
{
struct listnode *node;
struct interface *ifp;
- int mtu;
+ unsigned int mtu;
mtu = 0;
for (node = listhead (iflist); node; nextnode (node))
@@ -636,7 +636,7 @@ ripng_enable_network_delete (struct prefix *p)
/* Lookup function. */
int
-ripng_enable_if_lookup (char *ifname)
+ripng_enable_if_lookup (const char *ifname)
{
unsigned int i;
char *str;
@@ -650,7 +650,7 @@ ripng_enable_if_lookup (char *ifname)
/* Add interface to ripng_enable_if. */
int
-ripng_enable_if_add (char *ifname)
+ripng_enable_if_add (const char *ifname)
{
int ret;
@@ -667,7 +667,7 @@ ripng_enable_if_add (char *ifname)
/* Delete interface from ripng_enable_if. */
int
-ripng_enable_if_delete (char *ifname)
+ripng_enable_if_delete (const char *ifname)
{
int index;
char *str;
@@ -860,7 +860,7 @@ vector Vripng_passive_interface;
/* Utility function for looking up passive interface settings. */
int
-ripng_passive_interface_lookup (char *ifname)
+ripng_passive_interface_lookup (const char *ifname)
{
unsigned int i;
char *str;
@@ -902,7 +902,7 @@ ripng_passive_interface_apply_all (void)
/* Passive interface. */
int
-ripng_passive_interface_set (struct vty *vty, char *ifname)
+ripng_passive_interface_set (struct vty *vty, const char *ifname)
{
if (ripng_passive_interface_lookup (ifname) >= 0)
return CMD_WARNING;
@@ -915,7 +915,7 @@ ripng_passive_interface_set (struct vty *vty, char *ifname)
}
int
-ripng_passive_interface_unset (struct vty *vty, char *ifname)
+ripng_passive_interface_unset (struct vty *vty, const char *ifname)
{
int i;
char *str;
@@ -954,7 +954,7 @@ int
ripng_network_write (struct vty *vty, int config_mode)
{
unsigned int i;
- char *ifname;
+ const char *ifname;
struct route_node *node;
char buf[BUFSIZ];
diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c
index ab3c4601..46e23f0b 100644
--- a/ripngd/ripng_offset.c
+++ b/ripngd/ripng_offset.c
@@ -51,7 +51,7 @@ struct ripng_offset_list
static struct list *ripng_offset_list_master;
int
-strcmp_safe (char *s1, char *s2)
+strcmp_safe (const char *s1, const char *s2)
{
if (s1 == NULL && s2 == NULL)
return 0;
@@ -78,7 +78,7 @@ ripng_offset_list_free (struct ripng_offset_list *offset)
}
struct ripng_offset_list *
-ripng_offset_list_lookup (char *ifname)
+ripng_offset_list_lookup (const char *ifname)
{
struct ripng_offset_list *offset;
struct listnode *nn;
@@ -92,7 +92,7 @@ ripng_offset_list_lookup (char *ifname)
}
struct ripng_offset_list *
-ripng_offset_list_get (char *ifname)
+ripng_offset_list_get (const char *ifname)
{
struct ripng_offset_list *offset;
@@ -109,8 +109,9 @@ ripng_offset_list_get (char *ifname)
}
int
-ripng_offset_list_set (struct vty *vty, char *alist, char *direct_str,
- char *metric_str, char *ifname)
+ripng_offset_list_set (struct vty *vty, const char *alist,
+ const char *direct_str, const char *metric_str,
+ const char *ifname)
{
int direct;
int metric;
@@ -147,8 +148,9 @@ ripng_offset_list_set (struct vty *vty, char *alist, char *direct_str,
}
int
-ripng_offset_list_unset (struct vty *vty, char *alist, char *direct_str,
- char *metric_str, char *ifname)
+ripng_offset_list_unset (struct vty *vty, const char *alist,
+ const char *direct_str, const char *metric_str,
+ const char *ifname)
{
int direct;
int metric;
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index a3183010..1c17e6c3 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -45,7 +45,7 @@ struct rip_metric_modifier
int
ripng_route_match_add (struct vty *vty, struct route_map_index *index,
- const char *command, char *arg)
+ const char *command, const char *arg)
{
int ret;
@@ -69,7 +69,7 @@ ripng_route_match_add (struct vty *vty, struct route_map_index *index,
int
ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
- const char *command, char *arg)
+ const char *command, const char *arg)
{
int ret;
@@ -93,7 +93,7 @@ ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
int
ripng_route_set_add (struct vty *vty, struct route_map_index *index,
- const char *command, char *arg)
+ const char *command, const char *arg)
{
int ret;
@@ -117,7 +117,7 @@ ripng_route_set_add (struct vty *vty, struct route_map_index *index,
int
ripng_route_set_delete (struct vty *vty, struct route_map_index *index,
- const char *command, char *arg)
+ const char *command, const char *arg)
{
int ret;
@@ -163,7 +163,7 @@ route_match_metric (void *rule, struct prefix *prefix,
/* Route map `match metric' match statement. `arg' is METRIC value */
void *
-route_match_metric_compile (char *arg)
+route_match_metric_compile (const char *arg)
{
u_int32_t *metric;
@@ -223,7 +223,7 @@ route_match_interface (void *rule, struct prefix *prefix,
/* Route map `match interface' match statement. `arg' is IFNAME value */
void *
-route_match_interface_compile (char *arg)
+route_match_interface_compile (const char *arg)
{
return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg);
}
@@ -267,7 +267,7 @@ route_match_tag (void *rule, struct prefix *prefix,
/* Route map `match tag' match statement. `arg' is TAG value */
void *
-route_match_tag_compile (char *arg)
+route_match_tag_compile (const char *arg)
{
u_short *tag;
@@ -327,10 +327,10 @@ route_set_metric (void *rule, struct prefix *prefix,
/* set metric compilation. */
void *
-route_set_metric_compile (char *arg)
+route_set_metric_compile (const char *arg)
{
int len;
- char *pnt;
+ const char *pnt;
int type;
long metric;
char *endptr = NULL;
@@ -419,7 +419,7 @@ route_set_ipv6_nexthop_local (void *rule, struct prefix *prefix,
/* Route map `ipv6 nexthop local' compile function. Given string is converted
to struct in6_addr structure. */
void *
-route_set_ipv6_nexthop_local_compile (char *arg)
+route_set_ipv6_nexthop_local_compile (const char *arg)
{
int ret;
struct in6_addr *address;
@@ -479,7 +479,7 @@ route_set_tag (void *rule, struct prefix *prefix,
/* Route map `tag' compile function. Given string is converted
to u_short. */
void *
-route_set_tag_compile (char *arg)
+route_set_tag_compile (const char *arg)
{
u_short *tag;
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 7aaa3537..6e582599 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -184,7 +184,7 @@ ripng_redistribute_metric_unset (int type)
}
void
-ripng_redistribute_routemap_set (int type, char *name)
+ripng_redistribute_routemap_set (int type, const char *name)
{
if (ripng->route_map[type].name)
free (ripng->route_map[type].name);
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index a7254bc1..edf959fa 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2992,7 +2992,7 @@ ripng_routemap_update_redistribute (void)
}
void
-ripng_routemap_update (char *unused)
+ripng_routemap_update (const char *unused)
{
struct interface *ifp;
struct listnode *node;