]> git.ipfire.org Git - thirdparty/bird.git/blobdiff - proto/bgp/bgp.c
Trivial code cleanups
[thirdparty/bird.git] / proto / bgp / bgp.c
index 9d4671afc4fe7950743a67dfa09a58d6137537a8..cd57c32bc69077fa4041f1dae638bd035e833f7d 100644 (file)
@@ -1126,7 +1126,7 @@ static void
 bgp_connect(struct bgp_proto *p)       /* Enter Connect state and start establishing connection */
 {
   struct bgp_conn *conn = &p->outgoing_conn;
-  int hops = p->cf->multihop ? : 1;
+  int hops = p->cf->multihop ?: 1;
 
   DBG("BGP: Connecting\n");
   sock *s = sk_new(p->p.pool);
@@ -1263,7 +1263,7 @@ bgp_incoming_connection(sock *sk, uint dummy UNUSED)
     return 0;
   }
 
-  hops = p->cf->multihop ? : 1;
+  hops = p->cf->multihop ?: 1;
 
   if (sk_set_ttl(sk, p->cf->ttl_security ? 255 : hops) < 0)
     goto err;
@@ -2245,7 +2245,7 @@ bgp_reconfigure(struct proto *P, struct proto_config *CF)
   return 1;
 }
 
-#define TABLE(cf, NAME) ((cf)->NAME ? (cf)->NAME->table : NULL )
+#define TABLE(cf, NAME) ((cf)->NAME ? (cf)->NAME->table : NULL)
 
 static int
 bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *import_changed, int *export_changed)
@@ -2377,10 +2377,10 @@ bgp_store_error(struct bgp_proto *p, struct bgp_conn *c, u8 class, u32 code)
 }
 
 static char *bgp_state_names[] = { "Idle", "Connect", "Active", "OpenSent", "OpenConfirm", "Established", "Close" };
-static char *bgp_err_classes[] = { "", "Error: ", "Socket: ", "Received: ", "BGP Error: ", "Automatic shutdown: ", ""};
-static char *bgp_misc_errors[] = { "", "Neighbor lost", "Invalid next hop", "Kernel MD5 auth failed", "No listening socket", "Link down", "BFD session down", "Graceful restart"};
-static char *bgp_auto_errors[] = { "", "Route limit exceeded"};
-static char *bgp_gr_states[] = { "None", "Regular", "Long-lived"};
+static char *bgp_err_classes[] = { "", "Error: ", "Socket: ", "Received: ", "BGP Error: ", "Automatic shutdown: ", "" };
+static char *bgp_misc_errors[] = { "", "Neighbor lost", "Invalid next hop", "Kernel MD5 auth failed", "No listening socket", "Link down", "BFD session down", "Graceful restart" };
+static char *bgp_auto_errors[] = { "", "Route limit exceeded" };
+static char *bgp_gr_states[] = { "None", "Regular", "Long-lived" };
 
 static const char *
 bgp_last_errmsg(struct bgp_proto *p)