diff options
Diffstat (limited to 'src/expr/fwd.c')
-rw-r--r-- | src/expr/fwd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/expr/fwd.c b/src/expr/fwd.c index 1312ea1..38923df 100644 --- a/src/expr/fwd.c +++ b/src/expr/fwd.c @@ -147,6 +147,9 @@ static int nftnl_expr_fwd_snprintf_default(char *buf, size_t len, static int nftnl_expr_fwd_snprintf(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e) { + if (len) + buf[0] = '\0'; + switch (type) { case NFTNL_OUTPUT_DEFAULT: return nftnl_expr_fwd_snprintf_default(buf, len, e, flags); |