summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/String.c
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-20 14:24:36 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-20 14:24:36 +0000
commit955c32f2f0e3cd3485dcab8d3e35362871e41ae9 (patch)
treeec90b0c321c51918f0a8c021b3ae3c946104919d /MdePkg/Library/BaseLib/String.c
parentdcda0d6c94195e24d4796d13bd11f58be13d81d5 (diff)
downloadedk2-955c32f2f0e3cd3485dcab8d3e35362871e41ae9.tar.gz
edk2-955c32f2f0e3cd3485dcab8d3e35362871e41ae9.tar.bz2
edk2-955c32f2f0e3cd3485dcab8d3e35362871e41ae9.zip
Change style of (CONSTANT == Var) to (Var == CONSTANT) for BaseLib/String.c.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6153 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/String.c')
-rw-r--r--MdePkg/Library/BaseLib/String.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c
index d3fbd3e736..83f0ff430b 100644
--- a/MdePkg/Library/BaseLib/String.c
+++ b/MdePkg/Library/BaseLib/String.c
@@ -477,7 +477,7 @@ StrStr (
SearchStringTmp++;
}
- if ('\0' == *SearchStringTmp) {
+ if (*SearchStringTmp == '\0') {
return (CHAR16 *) FirstMatch;
}
@@ -647,14 +647,14 @@ StrDecimalToUintn (
//
// Ignore the pad spaces (space or tab)
//
- while ((L' ' ==*String) || (L'\t' == *String)) {
+ while ((*String == L' ') || (*String == L'\t')) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while (L'0' == *String) {
+ while (*String == L'0') {
String++;
}
@@ -666,7 +666,7 @@ StrDecimalToUintn (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINTN_DIVIDED_BY_10) ||
- ((QUOTIENT_MAX_UINTN_DIVIDED_BY_10 == Result) &&
+ ((Result == QUOTIENT_MAX_UINTN_DIVIDED_BY_10) &&
(*String - L'0') <= REMAINDER_MAX_UINTN_DIVIDED_BY_10)
);
@@ -729,14 +729,14 @@ StrDecimalToUint64 (
//
// Ignore the pad spaces (space or tab)
//
- while ((L' ' == *String) || (L'\t' == *String)) {
+ while ((*String == L' ') || (*String == L'\t')) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while (L'0' == *String) {
+ while (*String == L'0') {
String++;
}
@@ -748,7 +748,7 @@ StrDecimalToUint64 (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINT64_DIVIDED_BY_10) ||
- ((QUOTIENT_MAX_UINT64_DIVIDED_BY_10 == Result) &&
+ ((Result == QUOTIENT_MAX_UINT64_DIVIDED_BY_10) &&
(*String - L'0') <= REMAINDER_MAX_UINT64_DIVIDED_BY_10)
);
@@ -811,20 +811,20 @@ StrHexToUintn (
//
// Ignore the pad spaces (space or tab)
//
- while ((L' ' == *String) || (L'\t' == *String)) {
+ while ((*String == L' ') || (*String == L'\t')) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while (L'0' == *String) {
+ while (*String == L'0') {
String++;
}
if (InternalCharToUpper (*String) == L'X') {
- ASSERT (L'0' == *(String - 1));
- if (*(String - 1) != L'0') {
+ ASSERT (*(String - 1) == L'0');
+ if (*(String - 1) != L'0') {
return 0;
}
//
@@ -841,7 +841,7 @@ StrHexToUintn (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINTN_DIVIDED_BY_16) ||
- ((QUOTIENT_MAX_UINTN_DIVIDED_BY_16 == Result) &&
+ ((Result == QUOTIENT_MAX_UINTN_DIVIDED_BY_16) &&
(InternalHexCharToUintn (*String) <= REMAINDER_MAX_UINTN_DIVIDED_BY_16))
);
@@ -905,20 +905,20 @@ StrHexToUint64 (
//
// Ignore the pad spaces (space or tab)
//
- while ((L' ' == *String) || (L'\t' == *String)) {
+ while ((*String == L' ') || (*String == L'\t')) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while (L'0' == *String) {
+ while (*String == L'0') {
String++;
}
if (InternalCharToUpper (*String) == L'X') {
- ASSERT (L'0' == *(String - 1));
- if (*(String - 1) != L'0') {
+ ASSERT (*(String - 1) == L'0');
+ if (*(String - 1) != L'0') {
return 0;
}
//
@@ -935,7 +935,7 @@ StrHexToUint64 (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINT64_DIVIDED_BY_16)||
- ((QUOTIENT_MAX_UINT64_DIVIDED_BY_16 == Result) &&
+ ((Result == QUOTIENT_MAX_UINT64_DIVIDED_BY_16) &&
(InternalHexCharToUintn (*String) <= REMAINDER_MAX_UINT64_DIVIDED_BY_16))
);
@@ -1670,14 +1670,14 @@ AsciiStrDecimalToUintn (
//
// Ignore the pad spaces (space or tab)
//
- while ((' ' == *String) || ('\t' == *String)) {
+ while ((*String == ' ') || (*String == '\t' )) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while ('0' == *String) {
+ while (*String == '0') {
String++;
}
@@ -1689,7 +1689,7 @@ AsciiStrDecimalToUintn (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINTN_DIVIDED_BY_10) ||
- ((QUOTIENT_MAX_UINTN_DIVIDED_BY_10 == Result) &&
+ ((Result == QUOTIENT_MAX_UINTN_DIVIDED_BY_10) &&
(*String - '0') <= REMAINDER_MAX_UINTN_DIVIDED_BY_10)
);
@@ -1747,14 +1747,14 @@ AsciiStrDecimalToUint64 (
//
// Ignore the pad spaces (space or tab)
//
- while ((' ' == *String) || ('\t' == *String)) {
+ while ((*String == ' ') || (*String == '\t' )) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while ('0' == *String) {
+ while (*String == '0') {
String++;
}
@@ -1766,7 +1766,7 @@ AsciiStrDecimalToUint64 (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINT64_DIVIDED_BY_10) ||
- ((QUOTIENT_MAX_UINT64_DIVIDED_BY_10 == Result) &&
+ ((Result == QUOTIENT_MAX_UINT64_DIVIDED_BY_10) &&
(*String - '0') <= REMAINDER_MAX_UINT64_DIVIDED_BY_10)
);
@@ -1827,20 +1827,20 @@ AsciiStrHexToUintn (
//
// Ignore the pad spaces (space or tab)
//
- while ((' ' == *String) || ('\t' == *String)) {
+ while ((*String == ' ') || (*String == '\t' )) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while ('0' == *String) {
+ while (*String == '0') {
String++;
}
if (AsciiToUpper (*String) == 'X') {
- ASSERT ('0' == *(String - 1));
- if (*(String - 1) != '0') {
+ ASSERT (*(String - 1) == '0');
+ if (*(String - 1) != '0') {
return 0;
}
//
@@ -1857,7 +1857,7 @@ AsciiStrHexToUintn (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINTN_DIVIDED_BY_16) ||
- ((QUOTIENT_MAX_UINTN_DIVIDED_BY_16 == Result) &&
+ ((Result == QUOTIENT_MAX_UINTN_DIVIDED_BY_16) &&
(InternalAsciiHexCharToUintn (*String) <= REMAINDER_MAX_UINTN_DIVIDED_BY_16))
);
@@ -1922,20 +1922,20 @@ AsciiStrHexToUint64 (
//
// Ignore the pad spaces (space or tab)
//
- while ((' ' == *String) || ('\t' == *String)) {
+ while ((*String == ' ') || (*String == '\t' )) {
String++;
}
//
// Ignore leading Zeros after the spaces
//
- while ('0' == *String) {
+ while (*String == '0') {
String++;
}
if (AsciiToUpper (*String) == 'X') {
- ASSERT ('0' == *(String - 1));
- if (*(String - 1) != '0') {
+ ASSERT (*(String - 1) == '0');
+ if (*(String - 1) != '0') {
return 0;
}
//
@@ -1952,7 +1952,7 @@ AsciiStrHexToUint64 (
// to the range defined by UINTN, then ASSERT().
//
ASSERT ((Result < QUOTIENT_MAX_UINT64_DIVIDED_BY_16) ||
- ((QUOTIENT_MAX_UINT64_DIVIDED_BY_16 == Result) &&
+ ((Result == QUOTIENT_MAX_UINT64_DIVIDED_BY_16) &&
(InternalAsciiHexCharToUintn (*String) <= REMAINDER_MAX_UINT64_DIVIDED_BY_16))
);