]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
rule: fix "const static" declaration
authorThomas Haller <thaller@redhat.com>
Tue, 29 Aug 2023 18:54:07 +0000 (20:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Aug 2023 07:47:12 +0000 (09:47 +0200)
Gcc warns against this with "-Wextra":

    src/rule.c:869:1: error: static is not at beginning of declaration [-Werror=old-style-declaration]
      869 | const static struct prio_tag std_prios[] = {
          | ^~~~~
    src/rule.c:878:1: error: static is not at beginning of declaration [-Werror=old-style-declaration]
      878 | const static struct prio_tag bridge_std_prios[] = {
          | ^~~~~

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/rule.c

index 8ea606e146b219dc955ac7c94d46f3875769f335..bbea05d5b28899d5645b675899e5bdb25cb24129 100644 (file)
@@ -866,7 +866,7 @@ struct prio_tag {
        const char *str;
 };
 
-const static struct prio_tag std_prios[] = {
+static const struct prio_tag std_prios[] = {
        { NF_IP_PRI_RAW,      "raw" },
        { NF_IP_PRI_MANGLE,   "mangle" },
        { NF_IP_PRI_NAT_DST,  "dstnat" },
@@ -875,7 +875,7 @@ const static struct prio_tag std_prios[] = {
        { NF_IP_PRI_NAT_SRC,  "srcnat" },
 };
 
-const static struct prio_tag bridge_std_prios[] = {
+static const struct prio_tag bridge_std_prios[] = {
        { NF_BR_PRI_NAT_DST_BRIDGED,  "dstnat" },
        { NF_BR_PRI_FILTER_BRIDGED,   "filter" },
        { NF_BR_PRI_NAT_DST_OTHER,    "out" },