diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-04 13:58:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-04 14:17:24 +0200 |
commit | 2c8e01c555a488f32c9648a1b8ee7b6ed1c3e194 (patch) | |
tree | 2c51cfaf055ed34a3166082f664b7e29c33b57ad /src/set_elem.c | |
parent | 750fbea1a1b58d383707ce121e1140dbc5a8ee58 (diff) |
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 <pablo@netfilter.org>
Diffstat (limited to 'src/set_elem.c')
-rw-r--r-- | src/set_elem.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/set_elem.c b/src/set_elem.c index a8f88a4..a99876a 100644 --- a/src/set_elem.c +++ b/src/set_elem.c @@ -738,9 +738,6 @@ static int nftnl_set_elem_do_snprintf(char *buf, size_t size, const void *e, uint32_t cmd, uint32_t type, uint32_t flags) { - if (size) - buf[0] = '\0'; - return nftnl_set_elem_snprintf(buf, size, e, type, flags); } |