From 5372510d109d87b94d6094d095dd4e0e02eaf32a Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Mon, 3 Aug 2009 16:34:16 +0100 Subject: ospfd: neuter some compiler warnings * ospf_lsa.c: (link_info_set) Use %zd for size_t - C99 is old enough now. Lots of similar warnings all over the code. (ospf_lsa_translated_nssa_compare) Unused func - delete. --- ospfd/ospf_lsa.c | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'ospfd/ospf_lsa.c') diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index acc9c3f4..22612f6f 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -498,7 +498,7 @@ link_info_set (struct stream *s, struct in_addr id, if (ret == OSPF_MAX_LSA_SIZE) { - zlog_warn ("%s: Out of space in LSA stream, left %ld, size %ld", + zlog_warn ("%s: Out of space in LSA stream, left %zd, size %zd", __func__, STREAM_REMAIN (s), STREAM_SIZE (s)); return 0; } @@ -1861,43 +1861,6 @@ ospf_lsa_translated_nssa_new (struct ospf *ospf, return new; } -/* compare type-5 to type-7 - * -1: err, 0: same, 1: different - */ -static int -ospf_lsa_translated_nssa_compare (struct ospf_lsa *t7, struct ospf_lsa *t5) -{ - - struct as_external_lsa *e5 = (struct as_external_lsa *)t5, - *e7 = (struct as_external_lsa *)t7; - - - /* sanity checks */ - if (! ((t5->data->type == OSPF_AS_EXTERNAL_LSA) - && (t7->data->type == OSPF_AS_NSSA_LSA))) - return -1; - - if (t5->data->id.s_addr != t7->data->id.s_addr) - return -1; - - if (t5->data->ls_seqnum != t7->data->ls_seqnum) - return LSA_REFRESH_FORCE; - - if (e5->mask.s_addr != e7->mask.s_addr) - return LSA_REFRESH_FORCE; - - if (e5->e[0].fwd_addr.s_addr != e7->e[0].fwd_addr.s_addr) - return LSA_REFRESH_FORCE; - - if (e5->e[0].route_tag != e7->e[0].route_tag) - return LSA_REFRESH_FORCE; - - if (GET_METRIC (e5->e[0].metric) != GET_METRIC (e7->e[0].metric)) - return LSA_REFRESH_FORCE; - - return LSA_REFRESH_IF_CHANGED; -} - /* Originate Translated Type-5 for supplied Type-7 NSSA LSA */ struct ospf_lsa * ospf_translated_nssa_originate (struct ospf *ospf, struct ospf_lsa *type7) -- cgit v1.2.1