Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2795866pxy; Tue, 3 Aug 2021 15:45:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6ef2CrcvEEuHCVsKEDO3MYMCQseVQfReb7sRLH8wwtqMqChUB7Y7zQGDijAcbh8kNrT5n X-Received: by 2002:a17:906:7b49:: with SMTP id n9mr20844744ejo.299.1628030720443; Tue, 03 Aug 2021 15:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628030720; cv=none; d=google.com; s=arc-20160816; b=O6MWa5O8wzzIExQsqtCVwwaxkbxxhkcSWVOrYTMbNXdbzdleATuZWztj6xkmpgVQRc xpdW9yNy2JIsqxOrlIJ9ncyFndHs9jHN1i8YaCo1GHmhF6/MD/Wyo8e/RRM0g6K5sepD h80wzYTCPnLbq9DZitjTeWa/wBwDM5PXWghl9LBHsUts5HLQ2h+BSDU176LWmaOSWHhw V3G/Zh9y9vql5jhjxGXnwfb5mX8VrN7ZIiVwm0edsjuuKXW4ksqL+HParx9m4saO74Q7 Hn1iQhU1mh+gvWWqNYieSIQYhQb4dregXDCxQFXY7+z9tsfXzXmUEND1Uzip6WHWwPHY YhRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CO+UKXqS5BNpDVqSYc07VnzsVtu4YrsUEcfr+YsPUIk=; b=f0N7I+bBWatiqbVLYkuxwQ+ZfiQYJMiq+X9gOQJLbCojpV2+/ZZNF5IsNl3yWNDkxA iZskN2p/Xrstexb3ihnwM7zFVVLW88L6ToQ6kz6P+T+jm85LvPXSESBIkEb/0qC/cC1g z2hv7MtaIwGNLumOtKNkjR+N2BWYRoSrjbQFvH5J/z5a4s7oxPOZ6ezlaTml1RtEVlS3 otxxIIQ62fdAMDj+6Uu3fauYmXkqdVWg1tYTyJ1x1cz17w2+adoc/ktfEzWI/hAgNqu0 3atj1jVYGgeSljMx1Y1dSCI/8sc49aHt2S1xE46cfD5x0Wkb+1ckPT5arlNq77+83B/8 UFqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mhzUeMQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr3si161975ejb.139.2021.08.03.15.44.56; Tue, 03 Aug 2021 15:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mhzUeMQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233859AbhHCWhP (ORCPT + 99 others); Tue, 3 Aug 2021 18:37:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:54542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233805AbhHCWhI (ORCPT ); Tue, 3 Aug 2021 18:37:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 854DB6105A; Tue, 3 Aug 2021 22:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628030216; bh=qSdTywIFBc/13p1NNpVFBv7XGCZzOAfhX1X6Q8iXRyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mhzUeMQRKf7D1uB8U3KxLEhJ33/jEhVtELKeZoC/6Z3yG4lGPZWuikPTB+KfGYiZP 347UY+QWbVOsy7z+PPRv3Sg3VT+v2SRlfp4hzlSa10fJfD6PEoIz09SmPg11KFpInK AVMhalb+VrE4ZgfYeNaaKVIi4EuXSzCUtJMWwuST3mkgAtsP+JP5lel+cLuCHn45C/ tRYP5Yot/gV8bGB56FSvUS5yfyvHStL5XIAUgkVmh5+VIKkd3JvghtbCpsMWYIAQoR cG3Vjxp2aGB3zTMbxOVjzMj0qGoi+GJL+EPrJjBJF1CrmkNydhkyDS+uaqA3Ea0jC9 tfUrwq802e91g== From: Nathan Chancellor To: Greg Kroah-Hartman , Phillip Potter , Larry Finger Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 4/4] staging: r8188eu: Remove pointless NULL check in rtw_check_join_candidate() Date: Tue, 3 Aug 2021 15:36:09 -0700 Message-Id: <20210803223609.1627280-5-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc0 In-Reply-To: <20210803223609.1627280-1-nathan@kernel.org> References: <20210803223609.1627280-1-nathan@kernel.org> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: drivers/staging/r8188eu/core/rtw_mlme.c:1629:28: warning: address of array 'pmlmepriv->assoc_ssid.Ssid' will always evaluate to 'true' [-Wpointer-bool-conversion] if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) { ~~~~~~~~~~~~~~~~~~~~~~^~~~ ~~ 1 warning generated. Ssid is an array not at the beginning of a struct so its address cannot be NULL so remove the check. Signed-off-by: Nathan Chancellor --- drivers/staging/r8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index fa4df4a3a2df..16d8f7317897 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -1626,7 +1626,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv } /* check ssid, if needed */ - if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) { + if (pmlmepriv->assoc_ssid.SsidLength) { if (competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength || memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength)) goto exit; -- 2.33.0.rc0