]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: neuter some compiler warnings
authorPaul Jakma <paul@quagga.net>
Mon, 3 Aug 2009 15:34:16 +0000 (16:34 +0100)
committerPaul Jakma <paul@quagga.net>
Mon, 3 Aug 2009 15:52:38 +0000 (16:52 +0100)
* 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

index acc9c3f497e6906f351550c969a88635a51716c6..22612f6f5181ff7b86c3fefc4010d010bf8f9c57 100644 (file)
@@ -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)