]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix more clang compiler warnings
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Sun, 15 May 2016 17:31:30 +0000 (13:31 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 20 May 2016 13:33:57 +0000 (09:33 -0400)
Remove some dead code and fix initialization of the
sockunion.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
bgpd/bgp_attr.c
bgpd/bgp_routemap.c

index d37fa1e79a7b93468464948ff37ecee9f54cd20e..366b105f228726e9b744eedf12d3d92fe273487a 100644 (file)
@@ -74,7 +74,6 @@ static const struct message attr_flag_str[] =
   /* bgp_attr_flags_diagnose() relies on this bit being last in this list */
   { BGP_ATTR_FLAG_EXTLEN,   "Extended Length" },
 };
-static const size_t attr_flag_str_max = array_size(attr_flag_str);
 
 static struct hash *cluster_hash;
 
index 48cdd518ddad0fed2df2cabdc72f90b7200d6465..90f4cfe8b1207ccbd7e7f77dbf3cc659fc9358b3 100644 (file)
@@ -118,8 +118,8 @@ route_match_peer (void *rule, struct prefix *prefix, route_map_object_t type,
       void *object)
 {
   union sockunion *su;
-  union sockunion su_def = { .sa.sa_family = AF_INET,
-                            .sin.sin_addr.s_addr = INADDR_ANY };
+  union sockunion su_def = { .sin.sin_family = AF_INET,
+                             .sin.sin_addr.s_addr = INADDR_ANY };
   struct peer_group *group;
   struct peer *peer;
   struct listnode *node, *nnode;