Patchwork [libnftables] data_reg: Delete trailing space in snprintf_xml

login
register
mail settings
Submitter Arturo Borrero
Date May 28, 2013, 3:07 p.m.
Message ID <20130528150702.5328.73876.stgit@nfdev.cica.es>
Download mbox | patch
Permalink /patch/246885/
State Accepted
Headers show

Comments

Arturo Borrero - May 28, 2013, 3:07 p.m.
A minor cosmetic change. Delete the space before '>'.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/expr/data_reg.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira - May 29, 2013, 12:12 p.m.
On Tue, May 28, 2013 at 05:07:02PM +0200, Arturo Borrero wrote:
> A minor cosmetic change. Delete the space before '>'.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c
index 5ebc1de..11e4de8 100644
--- a/src/expr/data_reg.c
+++ b/src/expr/data_reg.c
@@ -291,7 +291,7 @@  int nft_data_reg_value_snprintf_xml(char *buf, size_t size,
 	uint8_t *tmp;
 	int data_len = reg->len/sizeof(uint32_t);
 
-	ret = snprintf(buf, len, "<data_reg type=\"value\" >");
+	ret = snprintf(buf, len, "<data_reg type=\"value\">");
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
 	ret = snprintf(buf+offset, len, "<len>%d</len>", data_len);
@@ -351,7 +351,7 @@  int nft_data_reg_snprintf(char *buf, size_t size, union nft_data_reg *reg,
 		switch(output_format) {
 		case NFT_RULE_O_XML:
 			return snprintf(buf, size,
-					"<data_reg type=\"verdict\" >"
+					"<data_reg type=\"verdict\">"
 						"<verdict>%d</verdict>"
 					"</data_reg>", reg->verdict);
 		case NFT_RULE_O_DEFAULT:
@@ -363,7 +363,7 @@  int nft_data_reg_snprintf(char *buf, size_t size, union nft_data_reg *reg,
 		switch(output_format) {
 		case NFT_RULE_O_XML:
 			return snprintf(buf, size,
-					"<data_reg type=\"chain\" >"
+					"<data_reg type=\"chain\">"
 						"<chain>%s</chain>"
 					"</data_reg>", reg->chain);
 		case NFT_RULE_O_DEFAULT: