summaryrefslogtreecommitdiffstats
path: root/src/expr/match.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/match.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/match.c')
-rw-r--r--src/expr/match.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/expr/match.c b/src/expr/match.c
index f83a8ea..57c5ab9 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -184,16 +184,15 @@ static int nft_rule_expr_match_parse(struct nft_rule_expr *e, struct nlattr *att
return 0;
}
-static
-int nft_rule_expr_match_snprintf_xml(char *buf, size_t len,
- struct nft_expr_match *mt)
+static int nft_rule_expr_match_snprintf_xml(char *buf, size_t len,
+ struct nft_expr_match *mt)
{
int ret, size=len;
int i;
int offset = 0;
uint8_t *data = (uint8_t *)mt->data;
- ret = snprintf(buf, len, "\t\t<name>%s</name> <rev>%u</rev> <info>0x",
+ ret = snprintf(buf, len, "<name>%s</name><rev>%u</rev><info>0x",
mt->name, mt->rev);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
@@ -202,7 +201,7 @@ int nft_rule_expr_match_snprintf_xml(char *buf, size_t len,
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}
- ret = snprintf(buf+offset, len, "</info>" );
+ ret = snprintf(buf+offset, len, "</info>");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return offset;