From: Shuah Khan <shuahkh@osg.samsung.com>
To: pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu,
davem@davemloft.net
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net/netfilter: Fix use uninitialized warn in nft_range_eval()
Date: Mon, 7 Nov 2016 08:41:14 -0700 [thread overview]
Message-ID: <20161107154114.26803-4-shuahkh@osg.samsung.com> (raw)
In-Reply-To: <20161107154114.26803-1-shuahkh@osg.samsung.com>
Fix the following warn:
CC [M] net/netfilter/nft_range.o
8601,8605c9105
net/netfilter/nft_range.c: In function ‘nft_range_eval’:
net/netfilter/nft_range.c:45:5: warning: ‘mismatch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (mismatch)
^
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
net/netfilter/nft_range.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nft_range.c b/net/netfilter/nft_range.c
index c6d5358..fe5f69b 100644
--- a/net/netfilter/nft_range.c
+++ b/net/netfilter/nft_range.c
@@ -28,7 +28,7 @@ static void nft_range_eval(const struct nft_expr *expr,
const struct nft_pktinfo *pkt)
{
const struct nft_range_expr *priv = nft_expr_priv(expr);
- bool mismatch;
+ bool mismatch = false;
int d1, d2;
d1 = memcmp(®s->data[priv->sreg], &priv->data_from, priv->len);
--
2.9.3
next prev parent reply other threads:[~2016-11-07 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 15:41 [PATCH] media: Fix get_key_haup_common.isra.4() debug message to print ptoggle value Shuah Khan
2016-11-07 15:41 ` [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion() Shuah Khan
2016-11-08 11:23 ` Sean Young
2016-11-07 15:41 ` [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() Shuah Khan
2016-11-07 15:44 ` Anna Schumaker
2016-11-07 16:14 ` Shuah Khan
2016-11-07 15:41 ` Shuah Khan [this message]
2016-11-08 23:13 ` [PATCH] net/netfilter: Fix use uninitialized warn in nft_range_eval() Pablo Neira Ayuso
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=20161107154114.26803-4-shuahkh@osg.samsung.com \
--to=shuahkh@osg.samsung.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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).