summaryrefslogtreecommitdiffstats
path: root/src/expr/nat.c
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-04-19 01:37:23 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-04-19 01:55:20 +0200
commitb0f2066ac0ebf3c5151ae2ece231b2317dfa3a5f (patch)
treea7541ffa730d8b0f72f2d7a05ee6c24bf9c14eff /src/expr/nat.c
parent605e56925beeda0d184e24d6d923f973a336bcb7 (diff)
src: remove trailing newlines, tabs and spaces from XML format
Delete all \n and \t from XML output, any reasonable XML viewer already does the nifty formatting for us. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/nat.c')
-rw-r--r--src/expr/nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expr/nat.c b/src/expr/nat.c
index 68217bd..56212a7 100644
--- a/src/expr/nat.c
+++ b/src/expr/nat.c
@@ -211,17 +211,17 @@ nft_rule_expr_nat_snprintf_xml(char *buf, size_t size,
switch (nat->type) {
case NFT_NAT_SNAT:
ret = snprintf(buf, len,
- "\t\t<type>NFT_NAT_SNAT</type> ");
+ "<type>NFT_NAT_SNAT</type>");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
break;
case NFT_NAT_DNAT:
ret = snprintf(buf, len,
- "\t\t<type>NFT_NAT_DNAT</type> ");
+ "<type>NFT_NAT_DNAT</type>");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
break;
}
- ret = snprintf(buf, len, "<family>%s</family> ",
+ ret = snprintf(buf, len, "<family>%s</family>",
nat->family == AF_INET ? "AF_INET" : "AF_INET6");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
@@ -234,7 +234,7 @@ nft_rule_expr_nat_snprintf_xml(char *buf, size_t size,
if (e->flags & (1 << NFT_EXPR_NAT_REG_PROTO_MIN)) {
ret = snprintf(buf, len, "<sreg_proto_min>%u</sreg_proto_min>"
- " <sreg_proto_max>%u</sreg_proto_max> ",
+ "<sreg_proto_max>%u</sreg_proto_max>",
nat->sreg_proto_min, nat->sreg_proto_max);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}