From c32d28b765e936acb8695f73a119d73cacff2610 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Tue, 27 Feb 2007 15:24:36 +0000 Subject: [ospf6d] Fix string comparison bug in ospf6_lsa_handler_name. 2007-02-27 Pavol Rusnak * ospf6_lsa.c: (ospf6_lsa_handler_name) Fix bug: must use strcmp to compare strings. --- ospf6d/ospf6_lsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospf6d/ospf6_lsa.c') diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 9ce0ac69..d555c3bd 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -717,7 +717,7 @@ ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) unsigned int i; unsigned int size = strlen (h->name); - if (h->name == "Unknown" && + if (!strcmp(h->name, "Unknown") && h->type != OSPF6_LSTYPE_UNKNOWN) { snprintf (buf, sizeof (buf), "%#04hx", h->type); -- cgit v1.2.3 From e733f949448e1cf9fa27e8b618c56a0e4badc1af Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 7 Jun 2007 13:11:58 +0000 Subject: [ospf6d] Fix silly bug: muse use strcmp to compare strings 2007-06-07 Pavol Rusnak * ospf6_lsa.c: (no_debug_ospf6_lsa_hex_cmd) Fix bug: must use strcmp to compare strings. --- ospf6d/ospf6_lsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospf6d/ospf6_lsa.c') diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index d555c3bd..e57384b3 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -855,7 +855,7 @@ DEFUN (no_debug_ospf6_lsa_type, UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG); if (handler->debug == 0 && - handler->name == "Unknown" && type != OSPF6_LSTYPE_UNKNOWN) + !strcmp(handler->name, "Unknown") && type != OSPF6_LSTYPE_UNKNOWN) { free (handler); vector_slot (ospf6_lsa_handler_vector, i) = NULL; -- cgit v1.2.3 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. --- ospf6d/ospf6_lsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ospf6d/ospf6_lsa.c') diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index e57384b3..87df7418 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -45,7 +45,7 @@ vector ospf6_lsa_handler_vector; -int +static int ospf6_unknown_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { u_char *start, *end, *current; @@ -703,14 +703,14 @@ ospf6_lsa_checksum (struct ospf6_lsa_header *lsa_header) } void -ospf6_lsa_init () +ospf6_lsa_init (void) { ospf6_lsa_handler_vector = vector_init (0); ospf6_install_lsa_handler (&unknown_handler); } -char * +static char * ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) { static char buf[64]; @@ -870,7 +870,7 @@ struct cmd_element no_debug_ospf6_lsa_type_cmd; struct cmd_element no_debug_ospf6_lsa_type_detail_cmd; void -install_element_ospf6_debug_lsa () +install_element_ospf6_debug_lsa (void) { u_int i; struct ospf6_lsa_handler *handler; -- cgit v1.2.3