]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/f_flow.c
Use C99 style initializers everywhere
[mirror_iproute2.git] / tc / f_flow.c
index b454a652b8218aa8b89ef7d5cce7206d417d0a4a..09ddcaa661796e606b697d5a37e6da7ac45d2de0 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>
  */
@@ -30,8 +30,8 @@ static void explain(void)
 "                 [ action ACTION_SPEC ]\n"
 "\n"
 "KEY-LIST := [ KEY-LIST , ] KEY\n"
-"KEY      := [ src | dst | proto | proto-src | proto-dst | iif | priority | \n"
-"              mark | nfct | nfct-src | nfct-dst | nfct-proto-src | \n"
+"KEY      := [ src | dst | proto | proto-src | proto-dst | iif | priority |\n"
+"              mark | nfct | nfct-src | nfct-dst | nfct-proto-src |\n"
 "              nfct-proto-dst | rt-classid | sk-uid | sk-gid |\n"
 "              vlan-tag | rxhash ]\n"
 "OPS      := [ or NUM | and NUM | xor NUM | rshift NUM | addend NUM ]\n"
@@ -133,7 +133,6 @@ out:
 static int flow_parse_opt(struct filter_util *fu, char *handle,
                          int argc, char **argv, struct nlmsghdr *n)
 {
-       struct tc_police tp;
        struct tcmsg *t = NLMSG_DATA(n);
        struct rtattr *tail;
        __u32 mask = ~0U, xor = 0;
@@ -141,8 +140,6 @@ static int flow_parse_opt(struct filter_util *fu, char *handle,
        __u32 mode = FLOW_MODE_MAP;
        __u32 tmp;
 
-       memset(&tp, 0, sizeof(tp));
-
        if (handle) {
                if (get_u32(&t->tcm_handle, handle, 0)) {
                        fprintf(stderr, "Illegal \"handle\"\n");
@@ -270,6 +267,7 @@ static int flow_print_opt(struct filter_util *fu, FILE *f, struct rtattr *opt,
                          __u32 handle)
 {
        struct rtattr *tb[TCA_FLOW_MAX+1];
+
        SPRINT_BUF(b1);
        unsigned int i;
        __u32 mask = ~0, val = 0;