From 6ac29a51075def99217a4ab1015635db3b3e83ed Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 15 Aug 2008 13:45:30 +0100 Subject: [trivia] finish off static'ification of ospf6d and ripngd 2008-08-15 Paul Jakma * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen. --- ripngd/ripng_offset.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'ripngd/ripng_offset.c') diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c index 31d78ba8..5bc2568e 100644 --- a/ripngd/ripng_offset.c +++ b/ripngd/ripng_offset.c @@ -32,6 +32,8 @@ #include "linklist.h" #include "memory.h" +#include "ripngd/ripngd.h" + #define RIPNG_OFFSET_LIST_IN 0 #define RIPNG_OFFSET_LIST_OUT 1 #define RIPNG_OFFSET_LIST_MAX 2 @@ -50,7 +52,7 @@ struct ripng_offset_list static struct list *ripng_offset_list_master; -int +static int strcmp_safe (const char *s1, const char *s2) { if (s1 == NULL && s2 == NULL) @@ -62,7 +64,7 @@ strcmp_safe (const char *s1, const char *s2) return strcmp (s1, s2); } -struct ripng_offset_list * +static struct ripng_offset_list * ripng_offset_list_new () { struct ripng_offset_list *new; @@ -71,13 +73,13 @@ ripng_offset_list_new () return new; } -void +static void ripng_offset_list_free (struct ripng_offset_list *offset) { XFREE (MTYPE_RIPNG_OFFSET_LIST, offset); } -struct ripng_offset_list * +static struct ripng_offset_list * ripng_offset_list_lookup (const char *ifname) { struct ripng_offset_list *offset; @@ -91,7 +93,7 @@ ripng_offset_list_lookup (const char *ifname) return NULL; } -struct ripng_offset_list * +static struct ripng_offset_list * ripng_offset_list_get (const char *ifname) { struct ripng_offset_list *offset; @@ -108,7 +110,7 @@ ripng_offset_list_get (const char *ifname) return offset; } -int +static int ripng_offset_list_set (struct vty *vty, const char *alist, const char *direct_str, const char *metric_str, const char *ifname) @@ -147,7 +149,7 @@ ripng_offset_list_set (struct vty *vty, const char *alist, return CMD_SUCCESS; } -int +static int ripng_offset_list_unset (struct vty *vty, const char *alist, const char *direct_str, const char *metric_str, const char *ifname) @@ -338,13 +340,13 @@ DEFUN (no_ripng_offset_list_ifname, return ripng_offset_list_unset (vty, argv[0], argv[1], argv[2], argv[3]); } -int +static int offset_list_cmp (struct ripng_offset_list *o1, struct ripng_offset_list *o2) { return strcmp_safe (o1->ifname, o2->ifname); } -void +static void offset_list_del (struct ripng_offset_list *offset) { if (OFFSET_LIST_IN_NAME (offset)) @@ -357,7 +359,7 @@ offset_list_del (struct ripng_offset_list *offset) } void -ripng_offset_init () +ripng_offset_init (void) { ripng_offset_list_master = list_new (); ripng_offset_list_master->cmp = (int (*)(void *, void *)) offset_list_cmp; @@ -370,7 +372,7 @@ ripng_offset_init () } void -ripng_offset_clean () +ripng_offset_clean (void) { list_delete (ripng_offset_list_master); -- cgit v1.2.1