linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp()
@ 2019-03-09  3:26 Mao Wenan
  2019-03-12  6:29 ` maowenan
  2019-03-17 11:26 ` Greg KH
  0 siblings, 2 replies; 9+ messages in thread
From: Mao Wenan @ 2019-03-09  3:26 UTC (permalink / raw)
  To: Larry.Finger, gregkh, straube.linux, jananis37, devel,
	linux-kernel, kernel-janitors, davem

Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 714f7a70ed64..beae367df93b 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -180,9 +180,8 @@ struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
 {
 	struct list_head *phead, *plist;
 	struct wlan_network *pnetwork = NULL;
-	u8 zero_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
 
-	if (!memcmp(zero_addr, addr, ETH_ALEN)) {
+	if (is_zero_ether_addr(addr)) {
 		pnetwork = NULL;
 		goto exit;
 	}
-- 
2.20.1


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

end of thread, other threads:[~2019-03-18 13:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09  3:26 [PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp() Mao Wenan
2019-03-12  6:29 ` maowenan
2019-03-12  6:35   ` Joe Perches
2019-03-12  6:58     ` maowenan
2019-03-12  7:06       ` Joe Perches
2019-03-12  7:14       ` Julia Lawall
2019-03-12 12:02   ` Greg KH
2019-03-17 11:26 ` Greg KH
2019-03-18 13:57   ` maowenan

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).