public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: NULL pointer comparison to a char literal should be to NULL
@ 2017-02-10  9:26 Yonghong Zhu
  0 siblings, 0 replies; only message in thread
From: Yonghong Zhu @ 2017-02-10  9:26 UTC (permalink / raw)
  To: edk2-devel; +Cc: Nikolai SAOUKH

From: Nikolai SAOUKH <nms@otdel-1.org>

GCC7 complaint -- error: ISO C++ forbids comparison between pointer and
integer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Nikolai SAOUKH <nms@otdel-1.org>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
index 3ca57ed..b81fc7b 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
@@ -3370,11 +3370,11 @@ CVfrStringDB::GetVarStoreNameFormStringId (
   EFI_STATUS  Status;
   CHAR8       LineBuf[EFI_IFR_MAX_LENGTH];
   UINT8       BlockType;
   EFI_HII_STRING_PACKAGE_HDR *PkgHeader;
   
-  if (mStringFileName == '\0' ) {
+  if (mStringFileName == NULL || *mStringFileName == '\0' ) {
     return NULL;
   }
 
   if ((pInFile = fopen (LongFilePath (mStringFileName), "rb")) == NULL) {
     return NULL;
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-10  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-10  9:26 [Patch] BaseTools: NULL pointer comparison to a char literal should be to NULL Yonghong Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox