From nobody Mon Dec 23 04:41:00 2024 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1520982713062231.72503793875433; Tue, 13 Mar 2018 16:11:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C7FB3225892B0; Tue, 13 Mar 2018 16:05:26 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 83E1D224CCC11 for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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=134.134.136.65; helo=mga03.intel.com; envelope-from=jaben.carsey@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.47,466,1515484800"; d="scan'208";a="207954913" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:31 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 1/5] BaseTools: Expression - remove redundant variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao 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" Str is created and not needed. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index e76f09c367c1..bcb27ec11fd5 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -46,14 +46,13 @@ ERR_IN_OPERAND =3D 'Macro after IN operator ca= n only be: $(FAMILY), $(ARC # def SplitString(String): # There might be escaped quote: "abc\"def\\\"ghi", 'abc\'def\\\'ghi' - Str =3D String RetList =3D [] InSingleQuote =3D False InDoubleQuote =3D False Item =3D '' - for i, ch in enumerate(Str): + for i, ch in enumerate(String): if ch =3D=3D '"' and not InSingleQuote: - if Str[i - 1] !=3D '\\': + if String[i - 1] !=3D '\\': InDoubleQuote =3D not InDoubleQuote if not InDoubleQuote: Item +=3D String[i] @@ -64,7 +63,7 @@ def SplitString(String): RetList.append(Item) Item =3D '' elif ch =3D=3D "'" and not InDoubleQuote: - if Str[i - 1] !=3D '\\': + if String[i - 1] !=3D '\\': InSingleQuote =3D not InSingleQuote if not InSingleQuote: Item +=3D String[i] @@ -84,13 +83,12 @@ def SplitString(String): def SplitPcdValueString(String): # There might be escaped comma in GUID() or DEVICE_PATH() or " " # or ' ' or L' ' or L" " - Str =3D String RetList =3D [] InParenthesis =3D 0 InSingleQuote =3D False InDoubleQuote =3D False Item =3D '' - for i, ch in enumerate(Str): + for i, ch in enumerate(String): if ch =3D=3D '(': InParenthesis +=3D 1 if ch =3D=3D ')': --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel