netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [conntrack-tools PATCH 3/4] conntrack: Fix for unused assignment in ct_save_snprintf()
Date: Tue, 20 Dec 2022 16:38:46 +0100	[thread overview]
Message-ID: <20221220153847.24152-4-phil@nwl.cc> (raw)
In-Reply-To: <20221220153847.24152-1-phil@nwl.cc>

Setting 'ret' without calling BUFFER_SIZE() is pointless.

Fixes: 1c596b9ec8f26 ("conntrack: implement save output format")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/conntrack.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/conntrack.c b/src/conntrack.c
index 07fae3dc2ff07..2bd71e17e6be6 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -761,7 +761,6 @@ static int ct_save_snprintf(char *buf, size_t len,
 		BUFFER_SIZE(ret, size, len, offset);
 		break;
 	default:
-		ret = 0;
 		break;
 	}
 
-- 
2.38.0


  parent reply	other threads:[~2022-12-20 15:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 15:38 [conntrack-tools PATCH 0/4] Fix some minor bugs Phil Sutter
2022-12-20 15:38 ` [conntrack-tools PATCH 1/4] conntrack: Fix potential array out of bounds access Phil Sutter
2022-12-20 15:38 ` [conntrack-tools PATCH 2/4] conntrack: Fix for unused assignment in do_command_ct() Phil Sutter
2022-12-20 15:38 ` Phil Sutter [this message]
2022-12-20 15:38 ` [conntrack-tools PATCH 4/4] conntrack: Sanitize free_tmpl_objects() Phil Sutter
2022-12-21 16:48 ` [conntrack-tools PATCH 0/4] Fix some minor bugs Pablo Neira Ayuso
2022-12-21 16:51   ` Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221220153847.24152-4-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).