diff options
author | Andrea Claudi <aclaudi@redhat.com> | 2023-05-31 12:35:56 +0200 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2023-06-05 12:49:34 -0600 |
commit | e0c7a04f1dfd7ca05e0725663489c6406d169b9c (patch) | |
tree | ea76872469b12316d45f7b0f17a16bdb92f026af | |
parent | efe6f2e143f5ffaf2b58221379993e08887323a8 (diff) |
treewide: fix indentation
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>
-rw-r--r-- | bridge/vni.c | 2 | ||||
-rw-r--r-- | genl/ctrl.c | 2 | ||||
-rw-r--r-- | ip/ipaddress.c | 2 | ||||
-rw-r--r-- | ip/ipmacsec.c | 4 | ||||
-rw-r--r-- | ip/ipprefix.c | 2 | ||||
-rw-r--r-- | ip/ipvrf.c | 2 | ||||
-rw-r--r-- | lib/fs.c | 2 | ||||
-rw-r--r-- | lib/ll_types.c | 8 | ||||
-rw-r--r-- | rdma/dev.c | 10 | ||||
-rw-r--r-- | tc/f_flower.c | 4 | ||||
-rw-r--r-- | tc/m_ipt.c | 4 | ||||
-rw-r--r-- | tc/m_xt_old.c | 4 | ||||
-rw-r--r-- | tc/q_fq.c | 8 | ||||
-rw-r--r-- | tc/q_htb.c | 4 | ||||
-rw-r--r-- | tc/tc_core.c | 2 |
15 files changed, 30 insertions, 30 deletions
diff --git a/bridge/vni.c b/bridge/vni.c index 77328a4f..5978e55c 100644 --- a/bridge/vni.c +++ b/bridge/vni.c @@ -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" diff --git a/genl/ctrl.c b/genl/ctrl.c index 8d2e9448..d5b765cc 100644 --- a/genl/ctrl.c +++ b/genl/ctrl.c @@ -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: diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 7accbf7d..361e6875 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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, diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c index 8b0d5666..476a6d1d 100644 --- a/ip/ipmacsec.c +++ b/ip/ipmacsec.c @@ -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) diff --git a/ip/ipprefix.c b/ip/ipprefix.c index ddf77014..c5704e5a 100644 --- a/ip/ipprefix.c +++ b/ip/ipprefix.c @@ -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)); @@ -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) @@ -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) diff --git a/lib/ll_types.c b/lib/ll_types.c index 20183ad6..69141ade 100644 --- a/lib/ll_types.c +++ b/lib/ll_types.c @@ -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; } @@ -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) diff --git a/tc/f_flower.c b/tc/f_flower.c index 48cfafdb..c73c46dd 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -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" @@ -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); diff --git a/tc/m_xt_old.c b/tc/m_xt_old.c index 7c6b79b9..9987d606 100644 --- a/tc/m_xt_old.c +++ b/tc/m_xt_old.c @@ -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); @@ -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); @@ -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, diff --git a/tc/tc_core.c b/tc/tc_core.c index 8276f6a1..871ceb45 100644 --- a/tc/tc_core.c +++ b/tc/tc_core.c @@ -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; |