Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6451061imb; Fri, 8 Mar 2019 19:15:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwea9aGTjT68A5sRnEij/JH1R5c105yRWg48dnrRVKINfGs71YMbVxE0UO9BbWWwI5fAebU X-Received: by 2002:a63:cd03:: with SMTP id i3mr11009962pgg.172.1552101303395; Fri, 08 Mar 2019 19:15:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552101303; cv=none; d=google.com; s=arc-20160816; b=sws5b5XVWVC9NwjYuxHUCyHZHZqeGHB1CH2CIIRqrhHZzZUbWH3rx4YFUXSCXaCTnf 5SNKB/tOoW+2Phj26PADjvj1H0mCLYbIFYHuHe6riWPeLyTPoWIz0Gl8QZci0D1npR0s jaqCPokK1sNazyd82ECEZwdZUoQKyvGkvzlM2Y0SIhYzx7DjnxmzfZFOrWfE+4FadunR O1slwAIe8j35B1CaPDX/f6ZX7Gz4bkEjKs5a7Zl1HCcbnExuuXBFWX952PAFnPlyWPed Mqp4GF99dpYyUj+5pfD9opOKq1umPzke1g9OTntNZSHff5hHG1qs4yD+NNXqKVEXSlaj geuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=NqrM7KdOfSpswj7owIY1Q15mPL1FP/g3Bt4loUg7FYw=; b=X3VVVPNX6jPcB1sCzZQp6MAKbGLtIIp32hSex6rPPmA+/7BocDiQ/DWewNG0yBhp3w EhvspsWS9A20LW2pyB49VtauY0ggLo4u4FV0/quzOh786lx940wzCNc2ek0LFzkTZvVe Ve2z0li+LtA/1pLGCT3mCUSDa4PKTJwpiDUGmctah+g0h7G7rSAvOWiU62BI/MrQ+qwa WTVAESUbKl1u3LSQIILMjDVW1+6efiWxUOMlzSlcsMCkLEk74GdTAbC4Z0mG3F3jzkVi N8MB1IxdOldkDAKjB3pQmL3758epxLmZScnEcZUa4EIBDIAC1pTgvIzIX11ZNwTO9f5m 06NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si8822573plw.207.2019.03.08.19.14.16; Fri, 08 Mar 2019 19:15:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726469AbfCIDNY (ORCPT + 99 others); Fri, 8 Mar 2019 22:13:24 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:36822 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726338AbfCIDNX (ORCPT ); Fri, 8 Mar 2019 22:13:23 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8701EA4BE16447BC2733; Sat, 9 Mar 2019 11:13:21 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Sat, 9 Mar 2019 11:13:16 +0800 From: Mao Wenan To: , , , , , , , Subject: [PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp() Date: Sat, 9 Mar 2019 11:26:00 +0800 Message-ID: <20190309032600.98732-1-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. Signed-off-by: Mao Wenan --- 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