]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
cifs: remove redundant assignment to the variable match
authorColin Ian King <colin.i.king@gmail.com>
Thu, 5 Jan 2023 13:41:11 +0000 (13:41 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 10 Jan 2023 21:31:08 +0000 (15:31 -0600)
The variable match is being assigned a value that is never read, it
is being re-assigned a new value later on. The assignment is redundant
and can be removed.

Cleans up clang scan-build warning:
fs/cifs/dfs_cache.c:1302:2: warning: Value stored to 'match' is never read

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/dfs_cache.c

index 43ad1176dcb9d643d64eb16424ab7ddacfd917f5..e20f8880363fab1c34a6e69c6a802761c148b89f 100644 (file)
@@ -1299,7 +1299,6 @@ static bool target_share_equal(struct TCP_Server_Info *server, const char *s1, c
         * Resolve share's hostname and check if server address matches.  Otherwise just ignore it
         * as we could not have upcall to resolve hostname or failed to convert ip address.
         */
-       match = true;
        extract_unc_hostname(s1, &host, &hostlen);
        scnprintf(unc, sizeof(unc), "\\\\%.*s", (int)hostlen, host);