]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenC.py
BaseTools: Remove equality operator with None
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenC.py
index 481c4dda1447d15a355b889beeebb35947ab4eca..cca6c8ab4fb57d77c2b157780e5888c46cf95124 100644 (file)
@@ -1085,7 +1085,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
                 if not Value.endswith('U'):\r
                     Value += 'U'\r
         if Pcd.DatumType not in ['UINT8', 'UINT16', 'UINT32', 'UINT64', 'BOOLEAN']:\r
-            if Pcd.MaxDatumSize == None or Pcd.MaxDatumSize == '':\r
+            if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize == '':\r
                 EdkLogger.error("build", AUTOGEN_ERROR,\r
                                 "Unknown [MaxDatumSize] of PCD [%s.%s]" % (Pcd.TokenSpaceGuidCName, TokenCName),\r
                                 ExtraData="[%s]" % str(Info))\r
@@ -1122,7 +1122,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
 \r
         if Pcd.DatumType not in ['UINT8', 'UINT16', 'UINT32', 'UINT64', 'BOOLEAN', 'VOID*']:\r
             # handle structure PCD\r
-            if Pcd.MaxDatumSize == None or Pcd.MaxDatumSize == '':\r
+            if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize == '':\r
                 EdkLogger.error("build", AUTOGEN_ERROR,\r
                                 "Unknown [MaxDatumSize] of PCD [%s.%s]" % (Pcd.TokenSpaceGuidCName, TokenCName),\r
                                 ExtraData="[%s]" % str(Info))\r