]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
treewide: fix indentation
authorAndrea Claudi <aclaudi@redhat.com>
Wed, 31 May 2023 10:35:56 +0000 (12:35 +0200)
committerDavid Ahern <dsahern@kernel.org>
Mon, 5 Jun 2023 18:49:34 +0000 (12:49 -0600)
Replace multiple whitespaces with tab where appropriate.
While at it, fix tc flower help message and remove some double
whitespaces.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
15 files changed:
bridge/vni.c
genl/ctrl.c
ip/ipaddress.c
ip/ipmacsec.c
ip/ipprefix.c
ip/ipvrf.c
lib/fs.c
lib/ll_types.c
rdma/dev.c
tc/f_flower.c
tc/m_ipt.c
tc/m_xt_old.c
tc/q_fq.c
tc/q_htb.c
tc/tc_core.c

index 77328a4fc7782ed517c4ce2f8ba80469bcd731f7..5978e55c79fd8a24559f7d82934b937a77b40b32 100644 (file)
@@ -33,7 +33,7 @@ static void usage(void)
        fprintf(stderr,
                "Usage: bridge vni { add | del } vni VNI\n"
                "               [ { group | remote } IP_ADDRESS ]\n"
-               "               [ dev DEV ]\n"
+               "               [ dev DEV ]\n"
                "       bridge vni { show }\n"
                "\n"
                "Where: VNI     := 0-16777215\n"
index 8d2e944802ba5b980c94bca88819c8bd26a1ca26..d5b765cca11b681dffce7834a412ce9ff700d696 100644 (file)
@@ -315,7 +315,7 @@ static int ctrl_list(int cmd, int argc, char **argv)
 
                rtnl_dump_filter(&rth, print_ctrl2, stdout);
 
-        }
+       }
 
        ret = 0;
 ctrl_done:
index 7accbf7d7822ceede16157f6fd69afc8fa3ab92a..361e6875b6714a0f374d0eaa0445bd9836e6c6e1 100644 (file)
@@ -1443,7 +1443,7 @@ static const struct ifa_flag_data_t* lookup_flag_data_by_name(const char* flag_n
                if (strcmp(flag_name, ifa_flag_data[i].name) == 0)
                        return &ifa_flag_data[i];
        }
-        return NULL;
+       return NULL;
 }
 
 static void print_ifa_flags(FILE *fp, const struct ifaddrmsg *ifa,
index 8b0d566652cbecfcdf18fce284cd5d9e8d71238d..476a6d1d2eb5296a40ee62a8648633dc2daa2d5b 100644 (file)
@@ -1379,10 +1379,10 @@ static int macsec_parse_opt(struct link_util *lu, int argc, char **argv,
                        if (strcmp(*argv, "default") == 0)
                                cipher.id = MACSEC_DEFAULT_CIPHER_ID;
                        else if (strcmp(*argv, "gcm-aes-128") == 0 ||
-                                strcmp(*argv, "GCM-AES-128") == 0)
+                                strcmp(*argv, "GCM-AES-128") == 0)
                                cipher.id = MACSEC_CIPHER_ID_GCM_AES_128;
                        else if (strcmp(*argv, "gcm-aes-256") == 0 ||
-                                strcmp(*argv, "GCM-AES-256") == 0)
+                                strcmp(*argv, "GCM-AES-256") == 0)
                                cipher.id = MACSEC_CIPHER_ID_GCM_AES_256;
                        else if (strcmp(*argv, "gcm-aes-xpn-128") == 0 ||
                                 strcmp(*argv, "GCM-AES-XPN-128") == 0)
index ddf770146784d5639f47ba67436af760902f91d5..c5704e5a50a5b3e1dc39f7fcffce553d8dbb6e93 100644 (file)
@@ -60,7 +60,7 @@ int print_prefix(struct nlmsghdr *n, void *arg)
 
        if (tb[PREFIX_ADDRESS]) {
                fprintf(fp, "prefix %s/%u",
-                       rt_addr_n2a_rta(family, tb[PREFIX_ADDRESS]),
+                       rt_addr_n2a_rta(family, tb[PREFIX_ADDRESS]),
                        prefix->prefix_len);
        }
        fprintf(fp, "dev %s ", ll_index_to_name(prefix->prefix_ifindex));
index 0718bea8bba9a715351414af0ec1058c209e441b..d6b59adbb21640be800f6795bf0b19df85f6dae8 100644 (file)
@@ -252,7 +252,7 @@ static int prog_load(int idx)
        };
 
        return bpf_program_load(BPF_PROG_TYPE_CGROUP_SOCK, prog, sizeof(prog),
-                               "GPL", bpf_log_buf, sizeof(bpf_log_buf));
+                               "GPL", bpf_log_buf, sizeof(bpf_log_buf));
 }
 
 static int vrf_configure_cgroup(const char *path, int ifindex)
index 7f4b159ccb650b68fea139a57969969d66c646ec..622f28b35536b3d94c5e2b51daba9782e4fad483 100644 (file)
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -41,7 +41,7 @@ static int name_to_handle_at(int dirfd, const char *pathname,
        struct file_handle *handle, int *mount_id, int flags)
 {
        return syscall(__NR_name_to_handle_at, dirfd, pathname, handle,
-                      mount_id, flags);
+                      mount_id, flags);
 }
 
 static int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags)
index 20183ad606bb1cc03745cf6f24a4ed174f4fd084..69141ade332f3e3da086a66f4094333cb0444c73 100644 (file)
@@ -108,10 +108,10 @@ __PF(VOID, void)
 #undef __PF
 
        unsigned int i;
-        for (i = 0; !numeric && i < ARRAY_SIZE(arphrd_names); i++) {
-                 if (arphrd_names[i].type == type)
+       for (i = 0; !numeric && i < ARRAY_SIZE(arphrd_names); i++) {
+               if (arphrd_names[i].type == type)
                        return arphrd_names[i].name;
        }
-        snprintf(buf, len, "[%d]", type);
-        return buf;
+       snprintf(buf, len, "[%d]", type);
+       return buf;
 }
index f09c33bc9ccdb29a3988e6ddb23be3f7bbbb5259..585bec54fa0e79ab3811b21ac0187c3f60ca5f71 100644 (file)
@@ -191,13 +191,13 @@ static void dev_print_node_type(struct rd *rd, struct nlattr **tb)
 
 static void dev_print_dev_proto(struct rd *rd, struct nlattr **tb)
 {
-       const char *str;
+       const char *str;
 
-       if (!tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL])
-               return;
+       if (!tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL])
+               return;
 
-       str = mnl_attr_get_str(tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL]);
-       print_color_string(PRINT_ANY, COLOR_NONE, "protocol", "protocol %s ", str);
+       str = mnl_attr_get_str(tb[RDMA_NLDEV_ATTR_DEV_PROTOCOL]);
+       print_color_string(PRINT_ANY, COLOR_NONE, "protocol", "protocol %s ", str);
 }
 
 static int dev_parse_cb(const struct nlmsghdr *nlh, void *data)
index 48cfafdbc3c08e39f6470a69addb54f0b2a63003..c73c46dd234b7bd5d53810b628d127a5ce6f1135 100644 (file)
@@ -57,7 +57,7 @@ static void explain(void)
                "                       cvlan_prio PRIORITY |\n"
                "                       cvlan_ethtype [ ipv4 | ipv6 | ETH-TYPE ] |\n"
                "                       pppoe_sid PSID |\n"
-               "                       ppp_proto [ ipv4 | ipv6 | mpls_uc | mpls_mc | PPP_PROTO ]"
+               "                       ppp_proto [ ipv4 | ipv6 | mpls_uc | mpls_mc | PPP_PROTO ] |\n"
                "                       dst_mac MASKED-LLADDR |\n"
                "                       src_mac MASKED-LLADDR |\n"
                "                       ip_proto [tcp | udp | sctp | icmp | icmpv6 | l2tp | IP-PROTO ] |\n"
@@ -88,7 +88,7 @@ static void explain(void)
                "                       enc_ttl MASKED-IP_TTL |\n"
                "                       geneve_opts MASKED-OPTIONS |\n"
                "                       vxlan_opts MASKED-OPTIONS |\n"
-               "                       erspan_opts MASKED-OPTIONS |\n"
+               "                       erspan_opts MASKED-OPTIONS |\n"
                "                       gtp_opts MASKED-OPTIONS |\n"
                "                       ip_flags IP-FLAGS |\n"
                "                       enc_dst_port [ port_number ] |\n"
index 3fe70faf2ec6decfac17585e940d1670edc7b80b..2538f769b0ee98b0bc7367ccf062e994df99ffa0 100644 (file)
@@ -409,8 +409,8 @@ static int parse_ipt(struct action_util *a, int *argc_p,
        optind = 0;
        free_opts(opts);
        /* Clear flags if target will be used again */
-        m->tflags = 0;
-        m->used = 0;
+       m->tflags = 0;
+       m->used = 0;
        /* Free allocated memory */
        free(m->t);
 
index 7c6b79b99af5bcc3b175d5688c3c6d0fdf4e23c9..9987d606a59cb11ffc4637c837049d9786ffa68f 100644 (file)
@@ -334,8 +334,8 @@ static int parse_ipt(struct action_util *a, int *argc_p,
        optind = 0;
        free_opts(opts);
        /* Clear flags if target will be used again */
-        m->tflags = 0;
-        m->used = 0;
+       m->tflags = 0;
+       m->used = 0;
        /* Free allocated memory */
        free(m->t);
 
index 0589800af0ea7e496ba009fbf52e101cfcb1b81d..3277ebc7c43702dfd663eb90100954c44e312fc3 100644 (file)
--- a/tc/q_fq.c
+++ b/tc/q_fq.c
@@ -23,7 +23,7 @@ static void explain(void)
        fprintf(stderr,
                "Usage: ... fq  [ limit PACKETS ] [ flow_limit PACKETS ]\n"
                "               [ quantum BYTES ] [ initial_quantum BYTES ]\n"
-               "               [ maxrate RATE  ] [ buckets NUMBER ]\n"
+               "               [ maxrate RATE ] [ buckets NUMBER ]\n"
                "               [ [no]pacing ] [ refill_delay TIME ]\n"
                "               [ low_rate_threshold RATE ]\n"
                "               [ orphan_mask MASK]\n"
@@ -243,13 +243,13 @@ static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
        if (set_ce_threshold)
                addattr_l(n, 1024, TCA_FQ_CE_THRESHOLD,
                          &ce_threshold, sizeof(ce_threshold));
-    if (set_timer_slack)
+       if (set_timer_slack)
                addattr_l(n, 1024, TCA_FQ_TIMER_SLACK,
                          &timer_slack, sizeof(timer_slack));
-    if (set_horizon)
+       if (set_horizon)
                addattr_l(n, 1024, TCA_FQ_HORIZON,
                          &horizon, sizeof(horizon));
-    if (horizon_drop != 255)
+       if (horizon_drop != 255)
                addattr_l(n, 1024, TCA_FQ_HORIZON_DROP,
                          &horizon_drop, sizeof(horizon_drop));
        addattr_nest_end(n, tail);
index 31862ffbb5e3bd6e6efcc940eff2ffc0c0b91cb8..63b9521b89de4bb5f2d3d9fada509409deeba0f5 100644 (file)
@@ -49,8 +49,8 @@ static void explain(void)
 
 static void explain1(char *arg)
 {
-    fprintf(stderr, "Illegal \"%s\"\n", arg);
-    explain();
+       fprintf(stderr, "Illegal \"%s\"\n", arg);
+       explain();
 }
 
 static int htb_parse_opt(struct qdisc_util *qu, int argc,
index 8276f6a1f60b6326679d718719c2f6d3ca344395..871ceb45ff58a2f97dffd537cd435240961903b3 100644 (file)
@@ -170,7 +170,7 @@ int tc_calc_rtable_64(struct tc_ratespec *r, __u32 *rtab,
                rtab[i] = tc_calc_xmittime(bps, sz);
        }
 
-       r->cell_align =  -1;
+       r->cell_align = -1;
        r->cell_log = cell_log;
        r->linklayer = (linklayer & TC_LINKLAYER_MASK);
        return cell_log;