public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>, Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH v1 11/11] BaseTools: remove extra assignment
Date: Wed, 20 Jun 2018 14:08:17 -0700	[thread overview]
Message-ID: <8fe5933a0f8b72333f23a1bff1a6c83beca0cef4.1529528784.git.jaben.carsey@intel.com> (raw)
In-Reply-To: <cover.1529528783.git.jaben.carsey@intel.com>
In-Reply-To: <cover.1529528783.git.jaben.carsey@intel.com>

there is no use to assign back to a variable.  just return the result.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
---
 BaseTools/Source/Python/Common/Expression.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 3133f610b4a7..3036af058c1d 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -197,8 +197,7 @@ def IntToStr(Value):
     while Value > 0:
         StrList.append(chr(Value & 0xff))
         Value = Value >> 8
-    Value = '"{VAL}"'.format(VAL=''.join(StrList))
-    return Value
+    return '"{VAL}"'.format(VAL=''.join(StrList))
 
 SupportedInMacroList = ['TARGET', 'TOOL_CHAIN_TAG', 'ARCH', 'FAMILY']
 
-- 
2.16.2.windows.1



  parent reply	other threads:[~2018-06-20 21:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 21:08 [PATCH v2 00/11] BaseTools Refactoring Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 01/11] BaseTools: decorate base classes to prevent instantiation Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 02/11] BaseTools: Workspace - create a base class Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 03/11] BaseTools: remove unused code Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 04/11] BaseTools: remove repeated calls to startswith/endswith Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 05/11] BaseTools: use set presence instead of series of equality Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 06/11] BaseTools: refactor section generation Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 07/11] BaseTools: refactor file opening/writing Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 08/11] BaseTools: refactor to change object types Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 09/11] BaseTools: refactor to stop re-allocating strings Jaben Carsey
2018-06-20 21:08 ` [PATCH v1 10/11] BaseTools: change to set for membership testing Jaben Carsey
2018-06-20 21:08 ` Jaben Carsey [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14 18:09 [PATCH v1 00/11] BaseTools refactoring Jaben Carsey
2018-05-14 18:09 ` [PATCH v1 11/11] BaseTools: remove extra assignment Jaben Carsey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fe5933a0f8b72333f23a1bff1a6c83beca0cef4.1529528784.git.jaben.carsey@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox