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


Groups > linux.kernel > #1498343

[PATCH 2/5] staging: wlan-ng: Replace data type declaration with variable of same type in hfa384x_usb.c

From Sergio Paracuellos <sergio.paracuellos@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/5] staging: wlan-ng: Replace data type declaration with variable of same type in hfa384x_usb.c
Date 2016-10-10 16:20 +0200
Message-ID <sqJAS-2hV-9@gated-at.bofh.it> (permalink)
References <sqJAS-2hV-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix it in hfa384x_usb.c file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index fbd9dc6..a83026e 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -531,7 +531,7 @@ static void hfa384x_usb_defer(struct work_struct *data)
  */
 void hfa384x_create(struct hfa384x *hw, struct usb_device *usb)
 {
-	memset(hw, 0, sizeof(struct hfa384x));
+	memset(hw, 0, sizeof(*hw));
 	hw->usb = usb;
 
 	/* set up the endpoints */
-- 
1.9.1

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


Thread

[PATCH 2/5] staging: wlan-ng: Replace data type declaration with variable of same type in hfa384x_usb.c Sergio Paracuellos <sergio.paracuellos@gmail.com> - 2016-10-10 16:20 +0200

csiph-web