]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: AutoGen - no need to recompute
authorCarsey, Jaben <jaben.carsey@intel.com>
Fri, 27 Apr 2018 22:32:36 +0000 (06:32 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 4 May 2018 05:03:07 +0000 (13:03 +0800)
looping over a list and recomputing the same value has no impact on final value

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>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/AutoGen/GenPcdDb.py

index c9cb77941c5d92fc43d367ca328f7b38d4558550..f8fbd06f5c6c9e6cbb6309680e9ac71b41461724 100644 (file)
@@ -301,8 +301,7 @@ class DbItemList:
             for ItemIndex in xrange(Index):\r
                 Offset += len(self.RawDataList[ItemIndex])\r
         else:\r
-            for Datas in self.RawDataList:\r
-                Offset = self.ItemSize * Index\r
+            Offset = self.ItemSize * Index\r
 \r
         return Offset\r
 \r