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/table.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/table.c') diff --git a/src/table.c b/src/table.c index db870cd..cf61dda 100644 --- a/src/table.c +++ b/src/table.c @@ -378,9 +378,6 @@ static int nftnl_table_cmd_snprintf(char *buf, size_t size, { int ret, remain = size, offset = 0; - if (size) - buf[0] = '\0'; - ret = nftnl_cmd_header_snprintf(buf + offset, remain, cmd, type, flags); SNPRINTF_BUFFER_SIZE(ret, remain, offset); -- cgit v1.2.3