From ca4009ab178cfa07a989ef9bbc89ee6f3caf1b93 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 4 Oct 2017 14:11:43 +0200 Subject: src: do not nul-terminate internal helper functions Public API already does this for us, no need to do this again from internal helper functions. Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 7cbd15b..a9e9870 100644 --- a/src/rule.c +++ b/src/rule.c @@ -792,9 +792,6 @@ static int nftnl_rule_cmd_snprintf(char *buf, size_t size, int ret, remain = size, offset = 0; uint32_t inner_flags = flags; - if (size) - buf[0] = '\0'; - inner_flags &= ~NFTNL_OF_EVENT_ANY; ret = nftnl_cmd_header_snprintf(buf + offset, remain, cmd, type, flags); -- cgit v1.2.3