]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/ECC: Fix an issue of parameter parser
authorHess Chen <hesheng.chen@intel.com>
Tue, 7 Mar 2017 06:01:33 +0000 (14:01 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 9 Mar 2017 07:04:33 +0000 (15:04 +0800)
The original solution of getting parameter name is to skip "_" but
now it doesn't ignore "_" anymore.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Ecc/c.py

index d7b95984385a2e2155968dd7ca123c0a63e3ec14..35b7405e550d3b221b652e5fffd700be9e029f43 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the c coding style checking of ECC tool\r
 #\r
-# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -271,7 +271,7 @@ def GetIdentifierList():
 def StripNonAlnumChars(Str):\r
     StrippedStr = ''\r
     for Char in Str:\r
-        if Char.isalnum():\r
+        if Char.isalnum() or Char == '_':\r
             StrippedStr += Char\r
     return StrippedStr\r
 \r