diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-04 13:19:10 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-04 14:06:39 +0200 |
commit | 750fbea1a1b58d383707ce121e1140dbc5a8ee58 (patch) | |
tree | 51edbe0851bf525bb1d16c6f5074bbe91b62c5d3 /src/expr/match.c | |
parent | 1876b4646ac04c1f57348b1e6601275b699cac67 (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/match.c')
-rw-r--r-- | src/expr/match.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/expr/match.c b/src/expr/match.c index af659b3..dd09e1e 100644 --- a/src/expr/match.c +++ b/src/expr/match.c @@ -200,9 +200,6 @@ nftnl_expr_match_snprintf(char *buf, size_t len, uint32_t type, { struct nftnl_expr_match *match = nftnl_expr_data(e); - if (len) - buf[0] = '\0'; - switch (type) { case NFTNL_OUTPUT_DEFAULT: return snprintf(buf, len, "name %s rev %u ", |