]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c
Minor coding style adjustment for DiskIo, Partition, English and Ebc modules.
[mirror_edk2.git] / MdeModulePkg / Universal / Disk / UnicodeCollation / EnglishDxe / UnicodeCollationEng.c
index 07bb2f446d4bbb5b2dd2aee850e936af2acd0c99..67f1db1c6cfcd02048af7a887c1552d04db56a47 100644 (file)
@@ -122,7 +122,7 @@ InitializeUnicodeCollationEng (
     }\r
   }\r
 \r
-  for (Index = 0; mOtherChars[Index]; Index++) {\r
+  for (Index = 0; mOtherChars[Index] != 0; Index++) {\r
     Index2 = mOtherChars[Index];\r
     mEngInfoMap[Index2] |= CHAR_FAT_VALID;\r
   }\r
@@ -191,8 +191,8 @@ EngStriColl (
   IN CHAR16                           *Str2\r
   )\r
 {\r
-  while (*Str1) {\r
-    if (ToUpper (*Str1) != ToUpper (*Str2)) {\r
+  while (*Str1 != 0) {\r
+    if (TO_UPPER (*Str1) != TO_UPPER (*Str2)) {\r
       break;\r
     }\r
 \r
@@ -200,7 +200,7 @@ EngStriColl (
     Str2 += 1;\r
   }\r
 \r
-  return ToUpper (*Str1) - ToUpper (*Str2);\r
+  return TO_UPPER (*Str1) - TO_UPPER (*Str2);\r
 }\r
 \r
 \r
@@ -219,8 +219,8 @@ EngStrLwr (
   IN OUT CHAR16                       *Str\r
   )\r
 {\r
-  while (*Str) {\r
-    *Str = ToLower (*Str);\r
+  while (*Str != 0) {\r
+    *Str = TO_LOWER (*Str);\r
     Str += 1;\r
   }\r
 }\r
@@ -241,8 +241,8 @@ EngStrUpr (
   IN OUT CHAR16                       *Str\r
   )\r
 {\r
-  while (*Str) {\r
-    *Str = ToUpper (*Str);\r
+  while (*Str != 0) {\r
+    *Str = TO_UPPER (*Str);\r
     Str += 1;\r
   }\r
 }\r
@@ -280,7 +280,7 @@ EngMetaiMatch (
       //\r
       // End of pattern.  If end of string, TRUE match\r
       //\r
-      if (*String) {\r
+      if (*String != 0) {\r
         return FALSE;\r
       } else {\r
         return TRUE;\r
@@ -290,7 +290,7 @@ EngMetaiMatch (
       //\r
       // Match zero or more chars\r
       //\r
-      while (*String) {\r
+      while (*String != 0) {\r
         if (EngMetaiMatch (This, String, Pattern)) {\r
           return TRUE;\r
         }\r
@@ -304,7 +304,7 @@ EngMetaiMatch (
       //\r
       // Match any one char\r
       //\r
-      if (!*String) {\r
+      if (*String == 0) {\r
         return FALSE;\r
       }\r
 \r
@@ -316,7 +316,7 @@ EngMetaiMatch (
       // Match char set\r
       //\r
       CharC = *String;\r
-      if (!CharC) {\r
+      if (CharC == 0) {\r
         //\r
         // syntax problem\r
         //\r
@@ -325,7 +325,7 @@ EngMetaiMatch (
 \r
       Index3  = 0;\r
       CharP   = *Pattern++;\r
-      while (CharP) {\r
+      while (CharP != 0) {\r
         if (CharP == ']') {\r
           return FALSE;\r
         }\r
@@ -342,7 +342,7 @@ EngMetaiMatch (
             return FALSE;\r
           }\r
 \r
-          if (ToUpper (CharC) >= ToUpper (Index3) && ToUpper (CharC) <= ToUpper (CharP)) {\r
+          if (TO_UPPER (CharC) >= TO_UPPER (Index3) && TO_UPPER (CharC) <= TO_UPPER (CharP)) {\r
             //\r
             // if in range, it's a match\r
             //\r
@@ -351,7 +351,7 @@ EngMetaiMatch (
         }\r
 \r
         Index3 = CharP;\r
-        if (ToUpper (CharC) == ToUpper (CharP)) {\r
+        if (TO_UPPER (CharC) == TO_UPPER (CharP)) {\r
           //\r
           // if char matches\r
           //\r
@@ -363,7 +363,7 @@ EngMetaiMatch (
       //\r
       // skip to end of match char set\r
       //\r
-      while (CharP && CharP != ']') {\r
+      while ((CharP != 0) && (CharP != ']')) {\r
         CharP = *Pattern;\r
         Pattern += 1;\r
       }\r
@@ -373,7 +373,7 @@ EngMetaiMatch (
 \r
     default:\r
       CharC = *String;\r
-      if (ToUpper (CharC) != ToUpper (CharP)) {\r
+      if (TO_UPPER (CharC) != TO_UPPER (CharP)) {\r
         return FALSE;\r
       }\r
 \r
@@ -408,7 +408,7 @@ EngFatToStr (
   //\r
   // No DBCS issues, just expand and add null terminate to end of string\r
   //\r
-  while (*Fat && FatSize) {\r
+  while ((*Fat != 0) && (FatSize != 0)) {\r
     *String = *Fat;\r
     String += 1;\r
     Fat += 1;\r
@@ -446,7 +446,7 @@ EngStrToFat (
   BOOLEAN SpecialCharExist;\r
 \r
   SpecialCharExist = FALSE;\r
-  while (*String && FatSize) {\r
+  while ((*String != 0) && (FatSize != 0)) {\r
     //\r
     // Skip '.' or ' ' when making a fat name\r
     //\r
@@ -455,7 +455,7 @@ EngStrToFat (
       // If this is a valid fat char, move it.\r
       // Otherwise, move a '_' and flag the fact that the name needs an Lfn\r
       //\r
-      if (*String < 0x100 && (mEngInfoMap[*String] & CHAR_FAT_VALID)) {\r
+      if (*String < 0x100 && ((mEngInfoMap[*String] & CHAR_FAT_VALID) != 0)) {\r
         *Fat = mEngUpperMap[*String];\r
       } else {\r
         *Fat              = '_';\r