From nobody Mon Feb 9 01:16:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527492980599158.6155825960094; Mon, 28 May 2018 00:36:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7C6B52096DCE6; Mon, 28 May 2018 00:36:15 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 818F521BADAB6 for ; Mon, 28 May 2018 00:36:12 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2018 00:36:12 -0700 Received: from shwde7172.ccr.corp.intel.com ([10.239.158.42]) by orsmga001.jf.intel.com with ESMTP; 28 May 2018 00:36:11 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,451,1520924400"; d="scan'208";a="59664766" From: Liming Gao To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 15:30:52 +0800 Message-Id: <1527492652-17544-4-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1527492652-17544-1-git-send-email-liming.gao@intel.com> References: <1527492652-17544-1-git-send-email-liming.gao@intel.com> Subject: [edk2] [Patch 3/3] MdeModulePkg Variable: Use comparison logic to check UINTN parameter X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit 180ac200da84785989443b06bcfa5db343c0bf7e changes the input parameter from BOOLEAN to UINTN. Its comparison logic should be updated. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Star Zeng --- MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8 ++++---- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/= MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index 8ad2c71..e37d0cd 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -599,7 +599,7 @@ VariableGetBestLanguage ( // // If in RFC 4646 mode, then determine the length of the first RFC 464= 6 language code in Language // - if (!Iso639Language) { + if (Iso639Language =3D=3D 0) { for (LanguageLength =3D 0; Language[LanguageLength] !=3D 0 && Langua= ge[LanguageLength] !=3D ';'; LanguageLength++); } =20 @@ -614,7 +614,7 @@ VariableGetBestLanguage ( // // In RFC 4646 mode, then Loop through all language codes in Suppo= rtedLanguages // - if (!Iso639Language) { + if (Iso639Language =3D=3D 0) { // // Skip ';' characters in Supported // @@ -636,13 +636,13 @@ VariableGetBestLanguage ( if (AsciiStrnCmp (Supported, Language, LanguageLength) =3D=3D 0) { VA_END (Args); =20 - Buffer =3D Iso639Language ? mVariableModuleGlobal->Lang : mVaria= bleModuleGlobal->PlatformLang; + Buffer =3D (Iso639Language !=3D 0) ? mVariableModuleGlobal->Lang= : mVariableModuleGlobal->PlatformLang; Buffer[CompareLength] =3D '\0'; return CopyMem (Buffer, Supported, CompareLength); } } =20 - if (Iso639Language) { + if (Iso639Language !=3D 0) { // // If ISO 639 mode, then each language can only be tested once // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeMod= ulePkg/Universal/Variable/RuntimeDxe/Variable.c index 5eff808..6073315 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1588,7 +1588,7 @@ VariableGetBestLanguage ( // // If in RFC 4646 mode, then determine the length of the first RFC 464= 6 language code in Language // - if (!Iso639Language) { + if (Iso639Language =3D=3D 0) { for (LanguageLength =3D 0; Language[LanguageLength] !=3D 0 && Langua= ge[LanguageLength] !=3D ';'; LanguageLength++); } =20 @@ -1603,7 +1603,7 @@ VariableGetBestLanguage ( // // In RFC 4646 mode, then Loop through all language codes in Suppo= rtedLanguages // - if (!Iso639Language) { + if (Iso639Language =3D=3D 0) { // // Skip ';' characters in Supported // @@ -1625,13 +1625,13 @@ VariableGetBestLanguage ( if (AsciiStrnCmp (Supported, Language, LanguageLength) =3D=3D 0) { VA_END (Args); =20 - Buffer =3D Iso639Language ? mVariableModuleGlobal->Lang : mVaria= bleModuleGlobal->PlatformLang; + Buffer =3D (Iso639Language !=3D 0) ? mVariableModuleGlobal->Lang= : mVariableModuleGlobal->PlatformLang; Buffer[CompareLength] =3D '\0'; return CopyMem (Buffer, Supported, CompareLength); } } =20 - if (Iso639Language) { + if (Iso639Language !=3D 0) { // // If ISO 639 mode, then each language can only be tested once // --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel