* [PATCH] netfilter: ebtables: clean up initialization of buf
@ 2017-10-16 10:24 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-16 10:24 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
Stephen Hemminger, David S . Miller, netfilter-devel, coreteam,
bridge, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
buf is initialized to buf_start and then set on the next statement
to buf_start + offsets[i]. Clean this up to just initialize buf
to buf_start + offsets[i] to clean up the clang build warning:
"Value stored to 'buf' during its initialization is never read"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/bridge/netfilter/ebtables.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 3b3dcf719e07..37817d25b63d 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -2112,9 +2112,8 @@ static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
for (i = 0, j = 1 ; j < 4 ; j++, i++) {
struct compat_ebt_entry_mwt *match32;
unsigned int size;
- char *buf = buf_start;
+ char *buf = buf_start + offsets[i];
- buf = buf_start + offsets[i];
if (offsets[i] > offsets[j])
return -EINVAL;
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] netfilter: ebtables: clean up initialization of buf
@ 2017-10-16 10:24 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-16 10:24 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
Stephen Hemminger, David S . Miller, netfilter-devel, coreteam,
bridge, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
buf is initialized to buf_start and then set on the next statement
to buf_start + offsets[i]. Clean this up to just initialize buf
to buf_start + offsets[i] to clean up the clang build warning:
"Value stored to 'buf' during its initialization is never read"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/bridge/netfilter/ebtables.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 3b3dcf719e07..37817d25b63d 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -2112,9 +2112,8 @@ static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
for (i = 0, j = 1 ; j < 4 ; j++, i++) {
struct compat_ebt_entry_mwt *match32;
unsigned int size;
- char *buf = buf_start;
+ char *buf = buf_start + offsets[i];
- buf = buf_start + offsets[i];
if (offsets[i] > offsets[j])
return -EINVAL;
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Bridge] [PATCH] netfilter: ebtables: clean up initialization of buf
@ 2017-10-16 10:24 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-16 10:24 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
Stephen Hemminger, David S . Miller, netfilter-devel, coreteam,
bridge, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
buf is initialized to buf_start and then set on the next statement
to buf_start + offsets[i]. Clean this up to just initialize buf
to buf_start + offsets[i] to clean up the clang build warning:
"Value stored to 'buf' during its initialization is never read"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/bridge/netfilter/ebtables.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 3b3dcf719e07..37817d25b63d 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -2112,9 +2112,8 @@ static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
for (i = 0, j = 1 ; j < 4 ; j++, i++) {
struct compat_ebt_entry_mwt *match32;
unsigned int size;
- char *buf = buf_start;
+ char *buf = buf_start + offsets[i];
- buf = buf_start + offsets[i];
if (offsets[i] > offsets[j])
return -EINVAL;
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] netfilter: ebtables: clean up initialization of buf
2017-10-16 10:24 ` Colin King
(?)
@ 2017-11-06 13:50 ` Pablo Neira Ayuso
-1 siblings, 0 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-06 13:50 UTC (permalink / raw)
To: Colin King
Cc: Jozsef Kadlecsik, Florian Westphal, Stephen Hemminger,
David S . Miller, netfilter-devel, coreteam, bridge, netdev,
kernel-janitors, linux-kernel
On Mon, Oct 16, 2017 at 11:24:02AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> buf is initialized to buf_start and then set on the next statement
> to buf_start + offsets[i]. Clean this up to just initialize buf
> to buf_start + offsets[i] to clean up the clang build warning:
> "Value stored to 'buf' during its initialization is never read"
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] netfilter: ebtables: clean up initialization of buf
@ 2017-11-06 13:50 ` Pablo Neira Ayuso
0 siblings, 0 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-06 13:50 UTC (permalink / raw)
To: Colin King
Cc: Jozsef Kadlecsik, Florian Westphal, Stephen Hemminger,
David S . Miller, netfilter-devel, coreteam, bridge, netdev,
kernel-janitors, linux-kernel
On Mon, Oct 16, 2017 at 11:24:02AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> buf is initialized to buf_start and then set on the next statement
> to buf_start + offsets[i]. Clean this up to just initialize buf
> to buf_start + offsets[i] to clean up the clang build warning:
> "Value stored to 'buf' during its initialization is never read"
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bridge] [PATCH] netfilter: ebtables: clean up initialization of buf
@ 2017-11-06 13:50 ` Pablo Neira Ayuso
0 siblings, 0 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-06 13:50 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, bridge, Florian Westphal, linux-kernel,
coreteam, netfilter-devel, Jozsef Kadlecsik, David S . Miller
On Mon, Oct 16, 2017 at 11:24:02AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> buf is initialized to buf_start and then set on the next statement
> to buf_start + offsets[i]. Clean this up to just initialize buf
> to buf_start + offsets[i] to clean up the clang build warning:
> "Value stored to 'buf' during its initialization is never read"
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-06 13:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 10:24 [PATCH] netfilter: ebtables: clean up initialization of buf Colin King
2017-10-16 10:24 ` [Bridge] " Colin King
2017-10-16 10:24 ` Colin King
2017-11-06 13:50 ` Pablo Neira Ayuso
2017-11-06 13:50 ` [Bridge] " Pablo Neira Ayuso
2017-11-06 13:50 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.