Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1558956

Re: [PATCH] cxgb4: Remove redundant memset before memcpy

From Tobias Klauser <tklauser@distanz.ch>
Newsgroups linux.kernel
Subject Re: [PATCH] cxgb4: Remove redundant memset before memcpy
Date 2017-01-14 13:30 +0100
Message-ID <sZvD3-5TG-1@gated-at.bofh.it> (permalink)
References <sZlaG-86Y-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2017-01-14 at 02:17:40 +0100, Shyam Saini <mayhs11saini@gmail.com> wrote:
> The region set by the call to memset, immediately overwritten by
> the subsequent call to memcpy and thus makes the  memset redundant.
> 
> Also remove the memset((&info, 0, sizeof(info)) on line 398 because
> info is memcpy()'ed to before being used in the loop and it isn't
> used outside of the loop.
> 
> Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>

Reviewed-by: Tobias Klauser <tklauser@distanz.ch>

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] cxgb4:  Remove redundant memset before memcpy Shyam Saini <mayhs11saini@gmail.com> - 2017-01-14 02:20 +0100
  Re: [PATCH] cxgb4:  Remove redundant memset before memcpy Tobias Klauser <tklauser@distanz.ch> - 2017-01-14 13:30 +0100
  Re: [PATCH] cxgb4: Remove redundant memset before memcpy David Miller <davem@davemloft.net> - 2017-01-14 18:10 +0100

csiph-web