2014-04-09 12:11 GMT+02:00 Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>: > On 9 April 2014 10:53, Ana Rey <anarey@xxxxxxxxx> wrote: >> Add an end of line in the exit of ruleset. >> >> Signed-off-by: Ana Rey <anarey@xxxxxxxxx> > > Hi Ana, > > Why do you need this here? > > The policy was to don't add any format stuff (tabs, newlines..) to > XML|JSON formats and let the caller add the trailing \n if needed.. Thank you for this advise. I'll remember it the next time. I solved this problem in the tests/nft-parsing-test.c (I'll send a new version of "[libnftnl PATCH 2/3] tests: New tools to uptade xml and json testfiles." patch and I deleted it of tihs patchset) Thank you! > > However, I see several inconsistencies already in the code: > src/rule.c: ret = snprintf(buf+offset, len, "\n"); > src/rule.c: ret = snprintf(buf+offset, len, "]\n"); > src/rule.c: ret = snprintf(buf+offset, len, " }\n"); > src/set.c: ret = snprintf(buf+offset, len, "\n"); > > -- > Arturo Borrero González -- Ana Rey (@anaRB) http://about.me/anarey -- 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