From 2c8e01c555a488f32c9648a1b8ee7b6ed1c3e194 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 4 Oct 2017 13:58:53 +0200 Subject: src: no need to nul-terminate buffer for nftnl_fprintf() calls This function bails out with -1 if we cannot print, and this buffer is internally allocated. No need for this overly deffensive initialization. Signed-off-by: Pablo Neira Ayuso --- src/set.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/set.c') diff --git a/src/set.c b/src/set.c index a4e41d2..36e59c3 100644 --- a/src/set.c +++ b/src/set.c @@ -939,9 +939,6 @@ EXPORT_SYMBOL(nftnl_set_snprintf); static int nftnl_set_do_snprintf(char *buf, size_t size, const void *s, uint32_t cmd, uint32_t type, uint32_t flags) { - if (size) - buf[0] = '\0'; - return nftnl_set_snprintf(buf, size, s, type, flags); } -- cgit v1.2.3