Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] cifs: remove redundant assignment to pointer pneg_ctxt
@ 2019-12-02 18:59 Colin King
  2019-12-02 22:57 ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-12-02 18:59 UTC (permalink / raw)
  To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The pointer pneg_ctxt is being initialized with a value that is never
read and it is being updated later with a new value.  The assignment
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/cifs/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index ed77f94dbf1d..be0de8a63e57 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -554,7 +554,7 @@ static void
 assemble_neg_contexts(struct smb2_negotiate_req *req,
 		      struct TCP_Server_Info *server, unsigned int *total_len)
 {
-	char *pneg_ctxt = (char *)req;
+	char *pneg_ctxt;
 	unsigned int ctxt_len;
 
 	if (*total_len > 200) {
-- 
2.24.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cifs: remove redundant assignment to pointer pneg_ctxt
  2019-12-02 18:59 [PATCH] cifs: remove redundant assignment to pointer pneg_ctxt Colin King
@ 2019-12-02 22:57 ` Steve French
  0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2019-12-02 22:57 UTC (permalink / raw)
  To: Colin King; +Cc: Steve French, CIFS, samba-technical, kernel-janitors, LKML

merged into cifs-2.6.git for-next

On Mon, Dec 2, 2019 at 1:00 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer pneg_ctxt is being initialized with a value that is never
> read and it is being updated later with a new value.  The assignment
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  fs/cifs/smb2pdu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index ed77f94dbf1d..be0de8a63e57 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -554,7 +554,7 @@ static void
>  assemble_neg_contexts(struct smb2_negotiate_req *req,
>                       struct TCP_Server_Info *server, unsigned int *total_len)
>  {
> -       char *pneg_ctxt = (char *)req;
> +       char *pneg_ctxt;
>         unsigned int ctxt_len;
>
>         if (*total_len > 200) {
> --
> 2.24.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 18:59 [PATCH] cifs: remove redundant assignment to pointer pneg_ctxt Colin King
2019-12-02 22:57 ` Steve French

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git