lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150602095844.GA31971@ubuntu>
Date:	Tue, 2 Jun 2015 09:58:50 +0000
From:	"Dhere, Chaitanya (C.)" <cvijaydh@...teon.com>
To:	Johnny Kim <johnny.kim@...el.com>,
	Rachel Kim <rachel.kim@...el.com>,
	"Dean Lee" <dean.lee@...el.com>, Chris Park <chris.park@...el.com>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
CC:	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: wilc1000: Modification in code to use ARRAY_SIZE
 macro

From: Chaitanya Dhere <cvijaydh@...teon.com>

In this patch, ARRAY_SIZE() macro is used to determine the
size. This change was detected with the help of coccinelle
tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@...teon.com>
---
 drivers/staging/wilc1000/linux_wlan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index b033eb8..592b8ae 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1737,7 +1737,7 @@ static int linux_wlan_read_mac_addr(void *vp)
 	mm_segment_t old_fs;
 	loff_t pos = 0;
 	int index;
-	int array_size = sizeof(path_string) / sizeof(path_string[0]);
+	int array_size = ARRAY_SIZE(path_string);
 
 	/* change to KERNEL_DS address limit */
 	old_fs = get_fs();
-- 
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ