summaryrefslogtreecommitdiffstats
path: root/src/expr/lookup.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-10-04 13:19:10 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-10-04 14:06:39 +0200
commit750fbea1a1b58d383707ce121e1140dbc5a8ee58 (patch)
tree51edbe0851bf525bb1d16c6f5074bbe91b62c5d3 /src/expr/lookup.c
parent1876b4646ac04c1f57348b1e6601275b699cac67 (diff)
expr: no need to nul-terminate buffer from expression ->snprintf indirection
->snprintf() is always called via nftnl_expr_snprintf() wrapper, which is already dealing with this corner case for us. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/lookup.c')
-rw-r--r--src/expr/lookup.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/expr/lookup.c b/src/expr/lookup.c
index 32220a3..5fcb81f 100644
--- a/src/expr/lookup.c
+++ b/src/expr/lookup.c
@@ -242,9 +242,6 @@ static int
nftnl_expr_lookup_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch(type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_lookup_snprintf_default(buf, size, e);