summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2024-01-22 06:29:14 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2024-01-22 06:29:14 +0100
commit13c6cf8a7430a6b133e46525256eb5554b3f0a2b (patch)
tree5df5a4f5093ad8013a8b5fb11e15ecf5673b90de /proto/bgp
parent2b6bd8ca3a3955a407b0553009b05572693cfdf7 (diff)
Trivial code cleanups
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/bgp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 9d4671af..cd57c32b 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -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)