This cause some chained snprintf to fail. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx> --- src/rule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rule.c b/src/rule.c index f0208d9..a91d21d 100644 --- a/src/rule.c +++ b/src/rule.c @@ -676,7 +676,7 @@ static int nft_rule_snprintf_xml(char *buf, size_t size, struct nft_rule *r, ret = snprintf(buf+offset, len, "</rule>"); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - return ret; + return offset; } static int nft_rule_snprintf_default(char *buf, size_t size, struct nft_rule *r, @@ -699,7 +699,7 @@ static int nft_rule_snprintf_default(char *buf, size_t size, struct nft_rule *r, SNPRINTF_BUFFER_SIZE(ret, size, len, offset); } - return ret; + return offset; } int nft_rule_snprintf(char *buf, size_t size, struct nft_rule *r, -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html