summaryrefslogtreecommitdiffstats
path: root/src/rule.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/rule.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/rule.c')
-rw-r--r--src/rule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rule.c b/src/rule.c
index 534526c..849cb41 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -459,17 +459,17 @@ static int nft_rule_snprintf_xml(char *buf, size_t size, struct nft_rule *r,
list_for_each_entry(expr, &r->expr_list, head) {
ret = snprintf(buf+offset, len,
- "\n\t<expr type=\"%s\">\n", expr->ops->name);
+ "<expr type=\"%s\">", expr->ops->name);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
ret = expr->ops->snprintf(buf+offset, len, type, flags, expr);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- ret = snprintf(buf+offset, len, "\n\t</expr>");
+ ret = snprintf(buf+offset, len, "</expr>");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}
- ret = snprintf(buf+offset, len, "\n</rule>\n ");
+ ret = snprintf(buf+offset, len, "</rule>");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return ret;