]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
whitespace cleanup
authorStephen Hemminger <shemming@brocade.com>
Sat, 20 Dec 2014 23:47:17 +0000 (15:47 -0800)
committerStephen Hemminger <shemming@brocade.com>
Sat, 20 Dec 2014 23:47:17 +0000 (15:47 -0800)
Remove all trailing whitespace and space before tabs.

20 files changed:
misc/arpd.c
misc/ifstat.c
misc/lnstat.c
misc/ss.c
tc/f_flow.c
tc/f_u32.c
tc/m_ipt.c
tc/m_pedit.c
tc/m_simple.c
tc/m_skbedit.c
tc/m_xt.c
tc/m_xt_old.c
tc/q_choke.c
tc/q_gred.c
tc/q_multiq.c
tc/q_netem.c
tc/q_sfq.c
tc/tc_class.c
tc/tc_filter.c
tc/tc_qdisc.c

index 0839e3f519dc49dae18281304348ffb0ac1e4867..7919eb8b36bb7659c4173a2bc0348684f1eee590 100644 (file)
@@ -433,7 +433,7 @@ static void load_initial_table(void)
                perror("dump request failed");
                exit(1);
        }
-               
+
 }
 
 static void get_kern_msg(void)
index a47c046127093971b590ce1feb7b61f6b4ed6f54..ab2cbc74f5e02423f0ab00db80f76e281723f821 100644 (file)
@@ -270,13 +270,13 @@ static void dump_raw_db(FILE *fp, int to_hist)
                                eol, n->name);
                        eol = ",\n";
                        for (i=0; i<MAXS && stats[i]; i++)
-                               fprintf(fp, " \"%s\":%llu", 
+                               fprintf(fp, " \"%s\":%llu",
                                        stats[i], vals[i]);
                        fprintf(fp, "}");
                } else {
                        fprintf(fp, "%d %s ", n->ifindex, n->name);
                        for (i=0; i<MAXS; i++)
-                               fprintf(fp, "%llu %u ", vals[i], 
+                               fprintf(fp, "%llu %u ", vals[i],
                                        (unsigned)rates[i]);
                        fprintf(fp, "\n");
                }
@@ -378,11 +378,11 @@ static void print_one_json(FILE *fp, const struct ifstat_ent *n,
 {
        int i, m;
        const char *sep = " ";
-       
+
        m = show_errors ? 20 : 10;
        fprintf(fp, "    \"%s\":{", n->name);
        for (i=0; i < m && stats[i]; i++) {
-               fprintf(fp, "%s\"%s\":%llu", 
+               fprintf(fp, "%s\"%s\":%llu",
                        sep, stats[i], vals[i]);
                sep = ", ";
        }
index 30ac8f53ad866831ead1054191f03c3361d08e37..32b5cbe579162589b3c3aa708c250529b7aedde3 100644 (file)
@@ -20,7 +20,7 @@
 #define MAX_FIELDS             128
 
 /* Maximum number of header lines */
-#define HDR_LINES              10
+#define HDR_LINES              10
 
 /* default field width if none specified */
 #define FIELD_WIDTH_DEFAULT    8
@@ -114,7 +114,7 @@ static void print_json(FILE *of, const struct lnstat_file *lnstat_files,
        fputs("{\n", of);
        for (i = 0; i < fp->num; i++) {
                const struct lnstat_field *lf = fp->params[i].lf;
-               
+
                if (!base || lf->file->basename != base) {
                        if (base) fputs("},\n", of);
                        base = lf->file->basename;
@@ -145,7 +145,7 @@ static int map_field_params(struct lnstat_file *lnstat_files,
                                if (!fps->params[j].print.width)
                                        fps->params[j].print.width =
                                                        FIELD_WIDTH_DEFAULT;
-                               
+
                                if (++j >= MAX_FIELDS - 1) {
                                        fprintf(stderr,
                                                "WARN: MAX_FIELDS (%d) reached,"
@@ -305,7 +305,7 @@ int main(int argc, char **argv)
                             tok;
                             tok = strtok(NULL, ",")) {
                                if (fp.num >= MAX_FIELDS) {
-                                       fprintf(stderr, 
+                                       fprintf(stderr,
                                                "WARN: too many keys"
                                                " requested: (%d max)\n",
                                                MAX_FIELDS);
index fa73fac3b92e7e2706755c199b06962e8d36c75e..706b5bada85b89213572ef7169a884cf3db4f645 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1726,7 +1726,7 @@ static int inet_show_sock(struct nlmsghdr *nlh, struct filter *f, int protocol)
                printf(" sk:");
                if (r->id.idiag_cookie[1] != 0)
                        printf("%08x", r->id.idiag_cookie[1]);
-               printf("%08x", r->id.idiag_cookie[0]);
+               printf("%08x", r->id.idiag_cookie[0]);
                if (tb[INET_DIAG_SHUTDOWN]) {
                        unsigned char mask;
                        mask = *(__u8 *)RTA_DATA(tb[INET_DIAG_SHUTDOWN]);
@@ -2743,7 +2743,7 @@ static int packet_show(struct filter *f)
        int uid;
        int ino;
        unsigned long long sk;
+
        if (preferred_family != AF_PACKET && !(f->states & (1 << SS_CLOSE)))
                return 0;
 
index b454a652b8218aa8b89ef7d5cce7206d417d0a4a..f398f55b6dffece344067a62a9b0afd2b9844ea3 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * f_flow.c            Flow filter
  *
- *             This program is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
+ *             This program is free software; you can redistribute it and/or
+ *             modify it under the terms of the GNU General Public License
+ *             as published by the Free Software Foundation; either version
+ *             2 of the License, or (at your option) any later version.
  *
  * Authors:    Patrick McHardy <kaber@trash.net>
  */
index 80a50970445e6f05c90a17aaa02940453e109606..cb63869dc3eb7ff47bc9f92c46e50255f528d835 100644 (file)
@@ -539,7 +539,7 @@ static int parse_ip(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
        *argv_p = argv;
        return res;
 }
-                               
+
 static int parse_ip6(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
 {
        int res = -1;
@@ -732,7 +732,7 @@ static int parse_selector(int *argc_p, char ***argv_p,
        } else if (matches(*argv, "ether") == 0) {
                NEXT_ARG();
                res = parse_ether(&argc, &argv, sel);
-       } else 
+       } else
                return -1;
 
        *argc_p = argc;
@@ -847,7 +847,7 @@ static void print_ipv4(FILE *f, const struct tc_u32_key *key)
        case 16: {
                        int bits = mask2bits(key->mask);
                        if (bits >= 0) {
-                               fprintf(f, "\n  %s %s/%d", 
+                               fprintf(f, "\n  %s %s/%d",
                                        key->off == 12 ? "match IP src" : "match IP dst",
                                        inet_ntop(AF_INET, &key->val,
                                                  abuf, sizeof(abuf)),
@@ -903,7 +903,7 @@ static void print_ipv6(FILE *f, const struct tc_u32_key *key)
        case 16: {
                        int bits = mask2bits(key->mask);
                        if (bits >= 0) {
-                               fprintf(f, "\n  %s %s/%d", 
+                               fprintf(f, "\n  %s %s/%d",
                                        key->off == 12 ? "match IP src" : "match IP dst",
                                        inet_ntop(AF_INET, &key->val,
                                                  abuf, sizeof(abuf)),
@@ -936,7 +936,7 @@ static void print_ipv6(FILE *f, const struct tc_u32_key *key)
 
 static void print_raw(FILE *f, const struct tc_u32_key *key)
 {
-       fprintf(f, "\n  match %08x/%08x at %s%d", 
+       fprintf(f, "\n  match %08x/%08x at %s%d",
                (unsigned int)ntohl(key->val),
                (unsigned int)ntohl(key->mask),
                key->offmask ? "nexthdr+" : "",
@@ -1152,7 +1152,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
        /* We dont necessarily need class/flowids */
        if (terminal_ok)
                sel.sel.flags |= TC_U32_TERMINAL;
-       
+
        if (order) {
                if (TC_U32_NODE(t->tcm_handle) && order != TC_U32_NODE(t->tcm_handle)) {
                        fprintf(stderr, "\"order\" contradicts \"handle\"\n");
@@ -1164,7 +1164,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
        if (htid)
                addattr_l(n, MAX_MSG, TCA_U32_HASH, &htid, 4);
        if (sel_ok)
-               addattr_l(n, MAX_MSG, TCA_U32_SEL, &sel, 
+               addattr_l(n, MAX_MSG, TCA_U32_SEL, &sel,
                          sizeof(sel.sel)+sel.sel.nkeys*sizeof(struct tc_u32_key));
        tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
        return 0;
index bb016f17fd8d15eeef192b1cf6c9c7e6551292f0..e5c48977bfc7436ad869da50e8a5c7b431c55666 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * m_ipt.c     iptables based targets
- *             utilities mostly ripped from iptables <duh, its the linux way>
+ *             utilities mostly ripped from iptables <duh, its the linux way>
  *
  *             This program is free software; you can distribute it and/or
  *             modify it under the terms of the GNU General Public License
index 16dd27764048398d8af8ba0a1adc5db8b50e31c0..dfe9b2ebd6e086c7f6993add1fbb23eed4b3f5d8 100644 (file)
@@ -9,9 +9,9 @@
  * Authors:  J Hadi Salim (hadi@cyberus.ca)
  *
  * TODO:
- *     1) Big endian broken in some spots
- *     2) A lot of this stuff was added on the fly; get a big double-double
- *     and clean it up at some point.
+ *     1) Big endian broken in some spots
+ *     2) A lot of this stuff was added on the fly; get a big double-double
+ *     and clean it up at some point.
  *
  */
 
index b61aca735050b02f6542ff6592c4883fd688c3b7..866552f559b3b69c9f6ffa9ec89ded5487fa437a 100644 (file)
@@ -9,7 +9,7 @@
  * Authors:    J Hadi Salim <jhs@mojatatu.com>
  *
  * Pedagogical example. Adds a string that will be printed every time
- * the simple instance is hit. 
+ * the simple instance is hit.
  * Use this as a skeleton action and keep modifying it to meet your needs.
  * Look at linux/tc_act/tc_defact.h for the different components ids and
  * definitions used in  this actions
  *
   hadi@noma1:$ tc qdisc add dev eth0 ingress
   hadi@noma1:$tc filter add dev eth0 parent ffff: protocol ip prio 5 \
-        u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
-  
+        u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
+
   hadi@noma1:$ sudo tc -s filter ls  dev eth0 parent ffff:
-   filter protocol ip pref 5 u32 
-   filter protocol ip pref 5 u32 fh 800: ht divisor 1 
-   filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 
+   filter protocol ip pref 5 u32
+   filter protocol ip pref 5 u32 fh 800: ht divisor 1
+   filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
      match 00010000/00ff0000 at 8
-       action order 1: Simple <Incoming ICMP>
-        index 4 ref 1 bind 1 installed 29 sec used 29 sec
-        Action statistics:
-               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
-               backlog 0b 0p requeues 0 
-  
-  
+       action order 1: Simple <Incoming ICMP>
+        index 4 ref 1 bind 1 installed 29 sec used 29 sec
+        Action statistics:
+               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
+               backlog 0b 0p requeues 0
+
+
   hadi@noma1$ ping -c 1 www.google.ca
   PING www.google.ca (74.125.225.120) 56(84) bytes of data.
   64 bytes from ord08s08-in-f24.1e100.net (74.125.225.120): icmp_req=1 ttl=53 time=31.3 ms
   [135354.473951] simple: Incoming ICMP_1
 
   hadi@noma1$ sudo tc/tc -s filter ls  dev eth0 parent ffff:
-  filter protocol ip pref 5 u32 
-  filter protocol ip pref 5 u32 fh 800: ht divisor 1 
-  filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 
+  filter protocol ip pref 5 u32
+  filter protocol ip pref 5 u32 fh 800: ht divisor 1
+  filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
     match 00010000/00ff0000 at 8
        action order 1: Simple <Incoming ICMP>
         index 4 ref 1 bind 1 installed 206 sec used 67 sec
        Action statistics:
-       Sent 84 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 
-       backlog 0b 0p requeues 0 
+       Sent 84 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
+       backlog 0b 0p requeues 0
 */
 
 #include <stdio.h>
@@ -82,7 +82,7 @@
 static void explain(void)
 {
        fprintf(stderr, "Usage: ... simple STRING\n"
-               "STRING being an arbitrary string\n" 
+               "STRING being an arbitrary string\n"
                "example: \"simple blah\"\n");
 }
 
index 4b4ee0602d02646bcefda7f621307df388bfe51d..36323a9d3ebd39c702e9bf2e1855edaddf90f4ec 100644 (file)
@@ -30,7 +30,7 @@
 static void
 explain(void)
 {
-       fprintf(stderr, "Usage: ... skbedit <[QM] [PM] [MM]>\n"
+       fprintf(stderr, "Usage: ... skbedit <[QM] [PM] [MM]>\n"
                "QM = queue_mapping QUEUE_MAPPING\n"
                "PM = priority PRIORITY \n"
                "MM = mark MARK \n"
index 48d0fb7a0bb7f449850c6cbcc70b97a5f2ba87d2..bf603fcb8c95247c84300202387c59a51d928684 100644 (file)
--- a/tc/m_xt.c
+++ b/tc/m_xt.c
@@ -1,6 +1,6 @@
 /*
  * m_xt.c      xtables based targets
- *             utilities mostly ripped from iptables <duh, its the linux way>
+ *             utilities mostly ripped from iptables <duh, its the linux way>
  *
  *             This program is free software; you can distribute it and/or
  *             modify it under the terms of the GNU General Public License
index 4d61a5aba82f58edba917e2494a4d11cd935f617..0ea0b4a96fa8555d8641a741a474c04a19916b0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * m_xt.c      xtables based targets
- *             utilities mostly ripped from iptables <duh, its the linux way>
+ *             utilities mostly ripped from iptables <duh, its the linux way>
  *
  *             This program is free software; you can distribute it and/or
  *             modify it under the terms of the GNU General Public License
index 6fbcadf308b3afe3228c651bf8802fb91163ccea..bd9ceb84264ac5c23633ac1b2a02375d286bd74d 100644 (file)
@@ -108,11 +108,11 @@ static int choke_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                return -1;
        }
 
-       /* Compute default min/max thresholds based on 
+       /* Compute default min/max thresholds based on
           Sally Floyd's recommendations:
           http://www.icir.org/floyd/REDparameters.txt
        */
-       if (!opt.qth_max) 
+       if (!opt.qth_max)
                opt.qth_max = opt.limit / 4;
        if (!opt.qth_min)
                opt.qth_min = opt.qth_max / 3;
index a4df3a6aeb767229151a7dfc4b13d3604bcf5d9b..88bd0947f77804f966b93bef56a3f0d72bab6aaf 100644 (file)
@@ -47,7 +47,7 @@ static void explain(void)
            "[grio]\n");
 }
 
-static int init_gred(struct qdisc_util *qu, int argc, char **argv, 
+static int init_gred(struct qdisc_util *qu, int argc, char **argv,
                     struct nlmsghdr *n)
 {
 
@@ -78,7 +78,7 @@ static int init_gred(struct qdisc_util *qu, int argc, char **argv,
                                return -1;
                        }
                        if (def_dp < 0 || def_dp > dps) {
-                               fprintf(stderr, 
+                               fprintf(stderr,
                                        "\"default DP\" must be less than %d\n",
                                        opt.DPs);
                                return -1;
index de29202797974c590e93bfb22eda1720fefc77b1..f4f41f78cc84401198074217a72e6c087a00b319 100644 (file)
@@ -18,7 +18,7 @@
  * Author: Alexander Duyck <alexander.h.duyck@intel.com>
  *
  * Original Authors:   PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com> (RR)
- *                     Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
+ *                     Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
  *
  */
 
index 8abe07f51df6c4715d2a5ae99beb3a4a9955a6b8..cd990a0a8dd6d65ffbce87a24f3211627d0bd0b9 100644 (file)
@@ -505,7 +505,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                        fprintf(stderr, "loss in the weeds!\n");
                        return -1;
                }
-               
+
                addattr_nest_end(n, start);
        }
 
@@ -584,7 +584,7 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
                                gimodel = RTA_DATA(lb[NETEM_LOSS_GI]);
                        if (lb[NETEM_LOSS_GE])
                                gemodel = RTA_DATA(lb[NETEM_LOSS_GE]);
-               }                       
+               }
                if (tb[TCA_NETEM_RATE]) {
                        if (RTA_PAYLOAD(tb[TCA_NETEM_RATE]) < sizeof(*rate))
                                return -1;
index 96f63ffcb9f825c7608825db470ecd28340c974b..50846a98d45ca0b542c91ff0e12eece75f336565 100644 (file)
@@ -159,11 +159,11 @@ static int sfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl
                        fprintf(stderr, "Required parameter (redflowlimit) is missing\n");
                        return -1;
                }
-               /* Compute default min/max thresholds based on 
+               /* Compute default min/max thresholds based on
                   Sally Floyd's recommendations:
                   http://www.icir.org/floyd/REDparameters.txt
                */
-               if (!opt.qth_max) 
+               if (!opt.qth_max)
                        opt.qth_max = opt.limit / 4;
                if (!opt.qth_min)
                        opt.qth_min = opt.qth_max / 3;
index e56bf07c9dafdeddf8784ae4635a868d1394ba2c..ba7869bf67b58c704e8b31af1ae47cdb631bd4bf 100644 (file)
@@ -79,7 +79,7 @@ static int tc_class_modify(int cmd, unsigned flags, int argc, char **argv)
                } else if (strcmp(*argv, "handle") == 0) {
                        fprintf(stderr, "Error: try \"classid\" instead of \"handle\"\n");
                        return -1;
-               } else if (strcmp(*argv, "root") == 0) {
+               } else if (strcmp(*argv, "root") == 0) {
                        if (req.t.tcm_parent) {
                                fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
                                return -1;
@@ -286,7 +286,7 @@ static int tc_class_list(int argc, char **argv)
                argc--; argv++;
        }
 
-       ll_init_map(&rth);
+       ll_init_map(&rth);
 
        if (d[0]) {
                if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
@@ -296,12 +296,12 @@ static int tc_class_list(int argc, char **argv)
                filter_ifindex = t.tcm_ifindex;
        }
 
-       if (rtnl_dump_request(&rth, RTM_GETTCLASS, &t, sizeof(t)) < 0) {
+       if (rtnl_dump_request(&rth, RTM_GETTCLASS, &t, sizeof(t)) < 0) {
                perror("Cannot send dump request");
                return 1;
        }
 
-       if (rtnl_dump_filter(&rth, print_class, stdout) < 0) {
+       if (rtnl_dump_filter(&rth, print_class, stdout) < 0) {
                fprintf(stderr, "Dump terminated\n");
                return 1;
        }
index c3f2d5fa863e908d23989f86c879606d53fd65ae..609fbe9b78b294fded2ae3e562d5b1581b1d92b4 100644 (file)
@@ -159,7 +159,7 @@ static int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
 
 
        if (d[0])  {
-               ll_init_map(&rth);
+               ll_init_map(&rth);
 
                if ((req.t.tcm_ifindex = ll_name_to_index(d)) == 0) {
                        fprintf(stderr, "Cannot find device \"%s\"\n", d);
@@ -326,7 +326,7 @@ static int tc_filter_list(int argc, char **argv)
 
        t.tcm_info = TC_H_MAKE(prio<<16, protocol);
 
-       ll_init_map(&rth);
+       ll_init_map(&rth);
 
        if (d[0]) {
                if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
@@ -336,12 +336,12 @@ static int tc_filter_list(int argc, char **argv)
                filter_ifindex = t.tcm_ifindex;
        }
 
-       if (rtnl_dump_request(&rth, RTM_GETTFILTER, &t, sizeof(t)) < 0) {
+       if (rtnl_dump_request(&rth, RTM_GETTFILTER, &t, sizeof(t)) < 0) {
                perror("Cannot send dump request");
                return 1;
        }
 
-       if (rtnl_dump_filter(&rth, print_filter, stdout) < 0) {
+       if (rtnl_dump_filter(&rth, print_filter, stdout) < 0) {
                fprintf(stderr, "Dump terminated\n");
                return 1;
        }
index e304858044cbb27762ac44cabfc4d090eaa1a679..c71937d0da212be648adf23d739083f7a6a55dfd 100644 (file)
@@ -178,7 +178,7 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
        if (d[0])  {
                int idx;
 
-               ll_init_map(&rth);
+               ll_init_map(&rth);
 
                if ((idx = ll_name_to_index(d)) == 0) {
                        fprintf(stderr, "Cannot find device \"%s\"\n", d);
@@ -309,7 +309,7 @@ static int tc_qdisc_list(int argc, char **argv)
                argc--; argv++;
        }
 
-       ll_init_map(&rth);
+       ll_init_map(&rth);
 
        if (d[0]) {
                if ((t.tcm_ifindex = ll_name_to_index(d)) == 0) {
@@ -319,12 +319,12 @@ static int tc_qdisc_list(int argc, char **argv)
                filter_ifindex = t.tcm_ifindex;
        }
 
-       if (rtnl_dump_request(&rth, RTM_GETQDISC, &t, sizeof(t)) < 0) {
+       if (rtnl_dump_request(&rth, RTM_GETQDISC, &t, sizeof(t)) < 0) {
                perror("Cannot send dump request");
                return 1;
        }
 
-       if (rtnl_dump_filter(&rth, print_qdisc, stdout) < 0) {
+       if (rtnl_dump_filter(&rth, print_qdisc, stdout) < 0) {
                fprintf(stderr, "Dump terminated\n");
                return 1;
        }