netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mwifiex: fix the length parameter of a memset
@ 2016-08-08  7:38 Christophe JAILLET
  2016-09-03 10:04 ` [1/2] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-08-08  7:38 UTC (permalink / raw)
  To: akarwar, nishants, linux-wireless
  Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

In 'mwifiex_get_ver_ext', we have:
   struct mwifiex_ver_ext ver_ext;

   memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext));

This is likely that memset'ing sizeof(struct mwifiex_ver_ext) was expected.
Remove the ambiguity by using the variable name directly instead of its
type.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index e06647a..78819e8 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -1180,7 +1180,7 @@ mwifiex_get_ver_ext(struct mwifiex_private *priv, u32 version_str_sel)
 {
 	struct mwifiex_ver_ext ver_ext;
 
-	memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext));
+	memset(&ver_ext, 0, sizeof(ver_ext));
 	ver_ext.version_str_sel = version_str_sel;
 	if (mwifiex_send_cmd(priv, HostCmd_CMD_VERSION_EXT,
 			     HostCmd_ACT_GEN_GET, 0, &ver_ext, true))
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: [1/2] mwifiex: fix the length parameter of a memset
  2016-08-08  7:38 [PATCH 1/2] mwifiex: fix the length parameter of a memset Christophe JAILLET
@ 2016-09-03 10:04 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-09-03 10:04 UTC (permalink / raw)
  To: Christophe Jaillet
  Cc: akarwar, nishants, linux-wireless, netdev, linux-kernel,
	kernel-janitors, Christophe JAILLET

Christophe Jaillet <christophe.jaillet@wanadoo.fr> wrote:
> In 'mwifiex_get_ver_ext', we have:
>    struct mwifiex_ver_ext ver_ext;
> 
>    memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext));
> 
> This is likely that memset'ing sizeof(struct mwifiex_ver_ext) was expected.
> Remove the ambiguity by using the variable name directly instead of its
> type.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Thanks, 2 patches applied to wireless-drivers-next.git:

ba852018d493 mwifiex: fix the length parameter of a memset
6a1622000ac9 mwifiex: simplify length computation for some memset

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9266889/

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

end of thread, other threads:[~2016-09-03 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08  7:38 [PATCH 1/2] mwifiex: fix the length parameter of a memset Christophe JAILLET
2016-09-03 10:04 ` [1/2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).