[PATCH 3/3] smb: client: Omit a variable initialisation in smb311_crypto_shash_allocate()
Steve French
smfrench at gmail.com
Fri Oct 10 21:47:39 UTC 2025
merged into cifs-2.6.git for-next
On Fri, Oct 10, 2025 at 1:52 AM Markus Elfring <Markus.Elfring at web.de> wrote:
>
> From: Markus Elfring <elfring at users.sourceforge.net>
> Date: Fri, 10 Oct 2025 08:05:21 +0200
> Subject: [PATCH 3/3] smb: client: Omit a variable initialisation in smb311_crypto_shash_allocate()
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The local variable “rc” is immediately reassigned. Thus omit the explicit
> initialisation at the beginning.
>
> Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
> ---
> fs/smb/client/smb2transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c
> index b790f6b970a9..3f8b0509f8c8 100644
> --- a/fs/smb/client/smb2transport.c
> +++ b/fs/smb/client/smb2transport.c
> @@ -50,7 +50,7 @@ int
> smb311_crypto_shash_allocate(struct TCP_Server_Info *server)
> {
> struct cifs_secmech *p = &server->secmech;
> - int rc = 0;
> + int rc;
>
> rc = cifs_alloc_hash("hmac(sha256)", &p->hmacsha256);
> if (rc)
> --
> 2.51.0
>
>
>
--
Thanks,
Steve
More information about the samba-technical
mailing list