]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/String.c
1. Change 0 == Length style to Length == 0
[mirror_edk2.git] / MdePkg / Library / BaseLib / String.c
index 6b68bb2eeca8b3fa0a087709f40b3d893a81a2ab..872642e9580dd1b00c7dec58cdedd6b2368e0129 100644 (file)
@@ -12,9 +12,7 @@
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
+\r
 \r
 \r
 #include "BaseLibInternals.h"\r
@@ -229,8 +227,8 @@ StrSize (
   @param  FirstString   Pointer to a Null-terminated Unicode string.\r
   @param  SecondString  Pointer to a Null-terminated Unicode string.\r
 \r
-  @retval 0   FirstString is identical to SecondString.\r
-  @retval !=0 FirstString is not identical to SecondString.\r
+  @retval 0      FirstString is identical to SecondString.\r
+  @return others FirstString is not identical to SecondString.\r
 \r
 **/\r
 INTN\r
@@ -279,8 +277,8 @@ StrCmp (
   @param  SecondString  Pointer to a Null-terminated Unicode string.\r
   @param  Length        Maximum number of Unicode characters to compare.\r
 \r
-  @retval 0   FirstString is identical to SecondString.\r
-  @retval !=0 FirstString is not identical to SecondString.\r
+  @retval 0      FirstString is identical to SecondString.\r
+  @return others FirstString is not identical to SecondString.\r
 \r
 **/\r
 INTN\r
@@ -291,7 +289,7 @@ StrnCmp (
   IN      UINTN                     Length\r
   )\r
 {\r
-  if (0 == Length) {\r
+  if (Length == 0) {\r
     return 0;\r
   }\r
 \r
@@ -438,7 +436,7 @@ StrnCat (
   @param  SearchString  Pointer to a Null-terminated Unicode string to search for.\r
 \r
   @retval NULL            If the SearchString does not appear in String.\r
-  @retval !NULL           If there is a match.\r
+  @return others          If there is a match.\r
 \r
 **/\r
 CHAR16 *\r
@@ -1153,7 +1151,7 @@ AsciiStrnCpy (
 {\r
   CHAR8                             *ReturnValue;\r
 \r
-  if (0 == Length) {\r
+  if (Length == 0) {\r
     return Destination;\r
   }\r
 \r
@@ -1265,8 +1263,8 @@ AsciiStrSize (
   @param  FirstString   Pointer to a Null-terminated ASCII string.\r
   @param  SecondString  Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval 0   FirstString is identical to SecondString.\r
-  @retval !=0 FirstString is not identical to SecondString.\r
+  @retval 0      FirstString is identical to SecondString.\r
+  @return others FirstString is not identical to SecondString.\r
 \r
 **/\r
 INTN\r
@@ -1362,10 +1360,10 @@ InternalAsciiHexCharToUintn (
   @param  FirstString   Pointer to a Null-terminated ASCII string.\r
   @param  SecondString  Pointer to a Null-terminated ASCII string.\r
 \r
-  @retval 0   FirstString is identical to SecondString using case insensitive\r
-              comparisons.\r
-  @retval !=0 FirstString is not identical to SecondString using case\r
-              insensitive comparisons.\r
+  @retval 0      FirstString is identical to SecondString using case insensitive\r
+                 comparisons.\r
+  @return others FirstString is not identical to SecondString using case\r
+                 insensitive comparisons.\r
 \r
 **/\r
 INTN\r
@@ -1420,8 +1418,8 @@ AsciiStriCmp (
   @param  SecondString  Pointer to a Null-terminated ASCII string.\r
   @param  Length        Maximum number of ASCII characters to compare.\r
                         \r
-  @retval 0   FirstString is identical to SecondString.\r
-  @retval !=0 FirstString is not identical to SecondString.\r
+  @retval 0      FirstString is identical to SecondString.\r
+  @return others FirstString is not identical to SecondString.\r
 \r
 **/\r
 INTN\r
@@ -1432,7 +1430,7 @@ AsciiStrnCmp (
   IN      UINTN                     Length\r
   )\r
 {\r
-  if (0 == Length) {\r
+  if (Length == 0) {\r
     return 0;\r
   }\r
 \r
@@ -1568,7 +1566,7 @@ AsciiStrnCat (
   @param  SearchString    Pointer to a Null-terminated ASCII string to search for.\r
 \r
   @retval NULL            If the SearchString does not appear in String.\r
-  @retval !NULL           If there is a match.\r
+  @return others          If there is a match.\r
 \r
 **/\r
 CHAR8 *\r
@@ -2103,7 +2101,7 @@ NibbleToHexChar (
 /** \r
   Convert binary buffer to a Unicode String in a specified sequence. \r
 \r
-  This function converts bytes in the binary Buffer Buf to a Unicode String Str. \r
+  This function converts bytes in the memory block pointed by Buffer to a Unicode String Str. \r
   Each byte will be represented by two Unicode characters. For example, byte 0xA1 will \r
   be converted into two Unicode character L'A' and L'1'. In the output String, the Unicode Character \r
   for the Most Significant Nibble will be put before the Unicode Character for the Least Significant\r
@@ -2278,6 +2276,10 @@ HexStringToBuf (
   L'A' will be converted to 0x0A. \r
 \r
   If Digit is NULL, then ASSERT.\r
+  \r
+  @param  Digit       The output hexadecimal digit.\r
+\r
+  @param  Char        The input Unicode character.\r
 \r
   @retval TRUE        Char is in the range of Hexadecimal number. Digit is updated\r
                       to the byte value of the number.\r