Skip to contentSkip to conversation

data_reg: conditional XML code for snprintf_xml

PATCH Applied Arturo Borrero 2 participants 2 messages May 28, 2013 – May 29, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data_reg: conditional XML code for snprintf_xml

Having or not XML parsing support doesn't break XML printing.

---
 src/expr/data_reg.c |    5 -----
 1 file changed, 5 deletions(-)
src/expr/data_reg.c +0 -5
index c0a048c..24497ff 100644
@@ -262,7 +262,6 @@ static
 int nft_data_reg_value_snprintf_xml(char *buf, size_t size,
 				    union nft_data_reg *reg, uint32_t flags)
 {
-#ifdef XML_PARSING
 	int len = size, offset = 0, ret, i, j;
 	uint8_t *tmp;
 	int data_len = reg->len/sizeof(uint32_t);
@@ -292,10 +291,6 @@ int nft_data_reg_value_snprintf_xml(char *buf, size_t size,
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
 	return offset;
-#else
-	errno = EOPNOTSUPP;
-	return -1;
-#endif
 }
 
 static int
maintainer Applied
#1 lore raw
Quoted 1 line · Arturo Borrero

Having or not XML parsing support doesn't break XML printing.

Applied, thanks.