]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables-restore: Remove some pointless linebreaks
authorPhil Sutter <phil@nwl.cc>
Tue, 17 Sep 2019 16:58:17 +0000 (18:58 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 6 Nov 2019 12:41:54 +0000 (13:41 +0100)
Due to reduced indenting level, some linebreaks are no longer needed.
OTOH, strings should not be split to aid in grepping for error output.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xtables-restore.c

index d21e9730805a86b8dd15ad14371d6c145df19f59..83e05102769a76b1839bf4f6ebd615b5e11ca007 100644 (file)
@@ -125,8 +125,7 @@ static void xtables_restore_parse_line(struct nft_handle *h,
                        return;
 
                if (h->noflush == 0) {
-                       DEBUGP("Cleaning all chains of table '%s'\n",
-                               table);
+                       DEBUGP("Cleaning all chains of table '%s'\n", table);
                        if (cb->table_flush)
                                cb->table_flush(h, table);
                }
@@ -151,8 +150,7 @@ static void xtables_restore_parse_line(struct nft_handle *h,
 
                if (strlen(chain) >= XT_EXTENSION_MAXNAMELEN)
                        xtables_error(PARAMETER_PROBLEM,
-                                  "Invalid chain name `%s' "
-                                  "(%u chars max)",
+                                  "Invalid chain name `%s' (%u chars max)",
                                   chain, XT_EXTENSION_MAXNAMELEN - 1);
 
                policy = strtok(NULL, " \t\n");
@@ -169,16 +167,15 @@ static void xtables_restore_parse_line(struct nft_handle *h,
 
                                if (!ctrs || !parse_counters(ctrs, &count))
                                        xtables_error(PARAMETER_PROBLEM,
-                                                  "invalid policy counters "
-                                                  "for chain '%s'\n", chain);
+                                                  "invalid policy counters for chain '%s'\n",
+                                                  chain);
 
                        }
                        if (cb->chain_set &&
                            cb->chain_set(h, state->curtable->name,
                                          chain, policy, &count) < 0) {
                                xtables_error(OTHER_PROBLEM,
-                                             "Can't set policy `%s'"
-                                             " on `%s' line %u: %s\n",
+                                             "Can't set policy `%s' on `%s' line %u: %s\n",
                                              policy, chain, line,
                                              strerror(errno));
                        }
@@ -187,15 +184,13 @@ static void xtables_restore_parse_line(struct nft_handle *h,
                } else if (cb->chain_restore(h, chain, state->curtable->name) < 0 &&
                           errno != EEXIST) {
                        xtables_error(PARAMETER_PROBLEM,
-                                     "cannot create chain "
-                                     "'%s' (%s)\n", chain,
-                                     strerror(errno));
+                                     "cannot create chain '%s' (%s)\n",
+                                     chain, strerror(errno));
                } else if (h->family == NFPROTO_BRIDGE &&
                           !ebt_set_user_chain_policy(h, state->curtable->name,
                                                      chain, policy)) {
                        xtables_error(OTHER_PROBLEM,
-                                     "Can't set policy `%s'"
-                                     " on `%s' line %u: %s\n",
+                                     "Can't set policy `%s' on `%s' line %u: %s\n",
                                      policy, chain, line,
                                      strerror(errno));
                }
@@ -232,8 +227,8 @@ static void xtables_restore_parse_line(struct nft_handle *h,
                                ret = 0;
 
                        if (ret < 0) {
-                               fprintf(stderr, "failed to abort "
-                                               "commit operation\n");
+                               fprintf(stderr,
+                                       "failed to abort commit operation\n");
                        }
                        exit(1);
                }