netlabel: remove redundant assignment to pointer iter
authorColin Ian King <colin.king@canonical.com>
Sun, 1 Sep 2019 15:52:05 +0000 (16:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Sep 2019 18:45:02 +0000 (11:45 -0700)
Pointer iter is being initialized with a value that is never read and
is being re-assigned a little later on. The assignment is redundant
and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlabel/netlabel_kapi.c

index 2b0ef55..409a3ae 100644 (file)
@@ -607,7 +607,7 @@ catmap_getnode_alloc:
  */
 int netlbl_catmap_walk(struct netlbl_lsm_catmap *catmap, u32 offset)
 {
-       struct netlbl_lsm_catmap *iter = catmap;
+       struct netlbl_lsm_catmap *iter;
        u32 idx;
        u32 bit;
        NETLBL_CATMAP_MAPTYPE bitmap;