netfilter: ebtables: clean up initialization of buf
authorColin Ian King <colin.king@canonical.com>
Mon, 16 Oct 2017 10:24:02 +0000 (11:24 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Nov 2017 13:47:29 +0000 (14:47 +0100)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebtables.c

index 83951f978445e5b9daede1eac715cec0d9f42987..54c274dbf4f13e06bdcaf87585e416af91c272e3 100644 (file)
@@ -2111,9 +2111,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;