ceph: remove redundant assignment to variable i
authorColin Ian King <colin.king@canonical.com>
Fri, 4 Dec 2020 18:54:21 +0000 (18:54 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Dec 2020 22:21:48 +0000 (23:21 +0100)
The variable i is being initialized with a value that is never read
and it is being updated later with a new value in a for-loop.  The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c

index 81eaf52..70d3479 100644 (file)
@@ -1239,7 +1239,7 @@ static struct ceph_msg *create_session_open_msg(struct ceph_mds_client *mdsc, u6
 {
        struct ceph_msg *msg;
        struct ceph_mds_session_head *h;
 {
        struct ceph_msg *msg;
        struct ceph_mds_session_head *h;
-       int i = -1;
+       int i;
        int extra_bytes = 0;
        int metadata_key_count = 0;
        struct ceph_options *opt = mdsc->fsc->client->options;
        int extra_bytes = 0;
        int metadata_key_count = 0;
        struct ceph_options *opt = mdsc->fsc->client->options;