[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161107154114.26803-4-shuahkh@osg.samsung.com>
Date: Mon, 7 Nov 2016 08:41:14 -0700
From: Shuah Khan <shuahkh@....samsung.com>
To: pablo@...filter.org, kaber@...sh.net, kadlec@...ckhole.kfki.hu,
davem@...emloft.net
Cc: Shuah Khan <shuahkh@....samsung.com>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] net/netfilter: Fix use uninitialized warn in nft_range_eval()
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@....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
Powered by blists - more mailing lists