summaryrefslogtreecommitdiffstats
path: root/src/expr/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/match.c')
-rw-r--r--src/expr/match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/expr/match.c b/src/expr/match.c
index dd09e1e..af659b3 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -200,6 +200,9 @@ 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 ",