KNF
authorclaudio <claudio@openbsd.org>
Mon, 20 Nov 2023 14:18:21 +0000 (14:18 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 20 Nov 2023 14:18:21 +0000 (14:18 +0000)
usr.sbin/bgpctl/mrtparser.c
usr.sbin/bgpctl/output.c
usr.sbin/bgpctl/output_json.c
usr.sbin/bgpctl/output_ometric.c
usr.sbin/bgpctl/parser.c

index 77fb54c..39b101c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: mrtparser.c,v 1.19 2022/10/18 09:30:29 job Exp $ */
+/*     $OpenBSD: mrtparser.c,v 1.20 2023/11/20 14:18:21 claudio Exp $ */
 /*
  * Copyright (c) 2011 Claudio Jeker <claudio@openbsd.org>
  *
@@ -435,7 +435,7 @@ mrt_parse_v2_rib(struct mrt_hdr *hdr, void *msg, int verbose)
 
                if ((aid = mrt_afi2aid(afi, safi, verbose)) == AID_UNSPEC)
                        goto fail;
-               
+
                /* prefix */
                ret = mrt_extract_prefix(b, len, aid, &r->prefix,
                    &r->prefixlen, verbose);
index d50a62c..d9a5e52 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output.c,v 1.41 2023/04/28 13:24:25 claudio Exp $ */
+/*     $OpenBSD: output.c,v 1.42 2023/11/20 14:18:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1176,21 +1176,21 @@ show_rtr(struct ctl_show_rtr *rtr)
        if (rtr->local_addr.aid != AID_UNSPEC)
                printf(" Local Address: %s\n", log_addr(&rtr->local_addr));
        if (rtr->session_id != -1)
-               printf (" Session ID: %d Serial #: %u\n",
+               printf(" Session ID: %d Serial #: %u\n",
                    rtr->session_id, rtr->serial);
        printf(" Refresh: %u, Retry: %u, Expire: %u\n",
            rtr->refresh, rtr->retry, rtr->expire);
 
        if (rtr->last_sent_error != NO_ERROR) {
                printf(" Last sent error: %s\n",
-                 log_rtr_error(rtr->last_sent_error));
+                   log_rtr_error(rtr->last_sent_error));
                if (rtr->last_sent_msg[0])
                        printf("   with reason \"%s\"",
                            log_reason(rtr->last_sent_msg));
        }
        if (rtr->last_recv_error != NO_ERROR) {
                printf(" Last received error: %s\n",
-                 log_rtr_error(rtr->last_recv_error));
+                   log_rtr_error(rtr->last_recv_error));
                if (rtr->last_recv_msg[0])
                        printf("   with reason \"%s\"",
                            log_reason(rtr->last_recv_msg));
index 40b48c0..cf0a476 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output_json.c,v 1.35 2023/06/05 16:24:05 claudio Exp $ */
+/*     $OpenBSD: output_json.c,v 1.36 2023/11/20 14:18:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@@ -392,7 +392,7 @@ json_fib(struct kroute_full *kf)
 
        if (kf->flags & F_MPLS) {
                json_do_array("mplslabel");
-               json_do_uint("mplslabel", 
+               json_do_uint("mplslabel",
                    ntohl(kf->mplslabel) >> MPLS_LABEL_OFFSET);
                json_do_end();
        }
@@ -956,7 +956,7 @@ json_rib_mem(struct rde_memstats *stats)
            stats->attr_cnt * sizeof(struct attr), stats->attr_refs);
        json_rib_mem_element("attributes", stats->attr_dcnt,
            stats->attr_data, UINT64_MAX);
-       json_rib_mem_element("total", UINT64_MAX, 
+       json_rib_mem_element("total", UINT64_MAX,
            pts + stats->prefix_cnt * sizeof(struct prefix) +
            stats->rib_cnt * sizeof(struct rib_entry) +
            stats->path_cnt * sizeof(struct rde_aspath) +
@@ -971,7 +971,7 @@ json_rib_mem(struct rde_memstats *stats)
            UINT64_MAX);
        json_rib_mem_element("prefix_set", stats->pset_cnt, stats->pset_size,
            UINT64_MAX);
-       json_rib_mem_element("total", UINT64_MAX, 
+       json_rib_mem_element("total", UINT64_MAX,
            stats->aset_size + stats->pset_size, UINT64_MAX);
        json_do_end();
 }
index 2b0b9be..69f9494 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: output_ometric.c,v 1.11 2023/03/28 12:07:09 claudio Exp $ */
+/*     $OpenBSD: output_ometric.c,v 1.12 2023/11/20 14:18:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
@@ -297,7 +297,7 @@ ometric_rib_mem(struct rde_memstats *stats)
        ometric_rib_mem_element("attributes", stats->attr_dcnt,
            stats->attr_data, UINT64_MAX);
 
-       ometric_rib_mem_element("total", UINT64_MAX, 
+       ometric_rib_mem_element("total", UINT64_MAX,
            pts + stats->prefix_cnt * sizeof(struct prefix) +
            stats->rib_cnt * sizeof(struct rib_entry) +
            stats->path_cnt * sizeof(struct rde_aspath) +
@@ -314,7 +314,7 @@ ometric_rib_mem(struct rde_memstats *stats)
            OKV("type"), OKV("prefix_set"), NULL);
        ometric_set_int_with_labels(rde_set_count, stats->pset_cnt,
            OKV("type"), OKV("prefix_set"), NULL);
-       ometric_rib_mem_element("set_total", UINT64_MAX, 
+       ometric_rib_mem_element("set_total", UINT64_MAX,
            stats->aset_size + stats->pset_size, UINT64_MAX);
 }
 
index ae9003f..56be82d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parser.c,v 1.133 2023/05/09 13:26:27 claudio Exp $ */
+/*     $OpenBSD: parser.c,v 1.134 2023/11/20 14:18:21 claudio Exp $ */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -329,8 +329,8 @@ static const struct token t_show_mrt_as[] = {
 static const struct token t_show_prefix[] = {
        { FLAG,         "all",          F_LONGER,       t_show_rib},
        { FLAG,         "longer-prefixes", F_LONGER,    t_show_rib},
-       { FLAG,         "or-longer",    F_LONGER,       t_show_rib},
-       { FLAG,         "or-shorter",   F_SHORTER,      t_show_rib},
+       { FLAG,         "or-longer",    F_LONGER,       t_show_rib},
+       { FLAG,         "or-shorter",   F_SHORTER,      t_show_rib},
        { ANYTOKEN,     "",             NONE,           t_show_rib},
        { ENDTOKEN,     "",             NONE,           NULL}
 };