]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebugger / EdbSupportString.c
index 1a396a40666099caf20650f9cdc182bee449523a..bb0626fae7e43535868d05730907172988a61c95 100644 (file)
@@ -37,19 +37,19 @@ Xtoi (
   //\r
   // skip preceeding white space\r
   //\r
-  while (*Str && *Str == ' ') {\r
+  while (*Str != '\0' && *Str == ' ') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding zeros\r
   //\r
-  while (*Str && *Str == '0') {\r
+  while (*Str != '\0' && *Str == '0') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding white space\r
   //\r
-  if (*Str && (*Str == 'x' || *Str == 'X')) {\r
+  if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {\r
     Str += 1;\r
   }\r
   //\r
@@ -57,7 +57,7 @@ Xtoi (
   //\r
   RetVal = 0;\r
   TempChar = *(Str++);\r
-  while (TempChar) {\r
+  while (TempChar != '\0') {\r
     if (TempChar >= 'a' && TempChar <= 'f') {\r
       TempChar -= 'a' - 'A';\r
     }\r
@@ -102,19 +102,19 @@ LXtoi (
   //\r
   // skip preceeding white space\r
   //\r
-  while (*Str && *Str == ' ') {\r
+  while (*Str != '\0' && *Str == ' ') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding zeros\r
   //\r
-  while (*Str && *Str == '0') {\r
+  while (*Str != '\0' && *Str == '0') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding white space\r
   //\r
-  if (*Str && (*Str == 'x' || *Str == 'X')) {\r
+  if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {\r
     Str += 1;\r
   }\r
   //\r
@@ -122,7 +122,7 @@ LXtoi (
   //\r
   RetVal = 0;\r
   TempChar = *(Str++);\r
-  while (TempChar) {\r
+  while (TempChar != '\0') {\r
     if (TempChar >= 'a' && TempChar <= 'f') {\r
       TempChar -= 'a' - 'A';\r
     }\r
@@ -169,7 +169,7 @@ Atoi (
   //\r
   // skip preceeding white space\r
   //\r
-  while (*Str && *Str == ' ') {\r
+  while (*Str != '\0' && *Str == ' ') {\r
     Str += 1;\r
   }\r
   //\r
@@ -177,7 +177,7 @@ Atoi (
   //\r
   RetVal = 0;\r
   TempChar = *(Str++);\r
-  while (TempChar) {\r
+  while (TempChar != '\0') {\r
     if (TempChar >= '0' && TempChar <= '9') {\r
       if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {\r
         return (UINTN) -1;\r
@@ -217,19 +217,19 @@ AsciiXtoi (
   //\r
   // skip preceeding white space\r
   //\r
-  while (*Str && *Str == ' ') {\r
+  while (*Str != '\0' && *Str == ' ') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding zeros\r
   //\r
-  while (*Str && *Str == '0') {\r
+  while (*Str != '\0' && *Str == '0') {\r
     Str += 1;\r
   }\r
   //\r
   // skip preceeding white space\r
   //\r
-  if (*Str && (*Str == 'x' || *Str == 'X')) {\r
+  if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {\r
     Str += 1;\r
   }\r
   //\r
@@ -237,7 +237,7 @@ AsciiXtoi (
   //\r
   RetVal = 0;\r
   TempChar = *(Str++);\r
-  while (TempChar) {\r
+  while (TempChar != '\0') {\r
     if (TempChar >= 'a' && TempChar <= 'f') {\r
       TempChar -= 'a' - 'A';\r
     }\r
@@ -283,7 +283,7 @@ AsciiAtoi (
   //\r
   // skip preceeding white space\r
   //\r
-  while (*Str && *Str == ' ') {\r
+  while (*Str != '\0' && *Str == ' ') {\r
     Str += 1;\r
   }\r
   //\r
@@ -291,7 +291,7 @@ AsciiAtoi (
   //\r
   RetVal = 0;\r
   TempChar = *(Str++);\r
-  while (TempChar) {\r
+  while (TempChar != '\0') {\r
     if (TempChar >= '0' && TempChar <= '9') {\r
       if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {\r
         return (UINTN) -1;\r
@@ -345,7 +345,7 @@ StrCmpUnicodeAndAscii (
   IN CHAR8    *String2\r
   )\r
 {\r
-  while (*String) {\r
+  while (*String != '\0') {\r
     if (*String != (CHAR16)*String2) {\r
       break;\r
     }\r
@@ -463,7 +463,7 @@ StrDuplicate (
 \r
   Size = (StrLen(Src) + 1) * sizeof(CHAR16);\r
   Dest = AllocateZeroPool (Size);\r
-  if (Dest) {\r
+  if (Dest != NULL) {\r
     CopyMem (Dest, Src, Size);\r
   }\r
   return Dest;\r
@@ -678,7 +678,7 @@ PatchForStrTokenAfter (
   }\r
   *Str = Patch;\r
 \r
-  while (*(Str ++)) {\r
+  while (*(Str ++) != '\0') {\r
     if (*Str == 0) {\r
       *Str = Patch;\r
     } else {\r
@@ -703,7 +703,7 @@ PatchForStrTokenBefore (
   }\r
 \r
   Str = Buffer;\r
-  while (*(Str --)) {\r
+  while (*(Str --) != '\0') {\r
     if ((*Str == 0) || (*Str == Patch)) {\r
       *Str = Patch;\r
     } else {\r
@@ -920,7 +920,7 @@ PatchForAsciiStrTokenAfter (
   }\r
   *Str = Patch;\r
 \r
-  while (*(Str ++)) {\r
+  while (*(Str ++) != '\0') {\r
     if (*Str == 0) {\r
       *Str = Patch;\r
     } else {\r
@@ -945,7 +945,7 @@ PatchForAsciiStrTokenBefore (
   }\r
 \r
   Str = Buffer;\r
-  while (*(Str --)) {\r
+  while (*(Str --) != '\0') {\r
     if ((*Str == 0) || (*Str == Patch)) {\r
       *Str = Patch;\r
     } else {\r