diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-12-01 17:07:09 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-12-06 18:40:19 +0800 |
commit | 532daaed0d585e3c7142b2fb7ee955c599f4c812 (patch) | |
tree | 0a67fc375aaa505cb621ad8a910d9d02a89e4bb6 /MdeModulePkg | |
parent | 3e118ea87dbdfd5190b624a9febd7e8b07a1aa6e (diff) | |
download | edk2-platforms-532daaed0d585e3c7142b2fb7ee955c599f4c812.tar.xz |
MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
Diffstat (limited to 'MdeModulePkg')
5 files changed, 97 insertions, 97 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c index dab53a02cf..dddf78239c 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.c @@ -194,8 +194,8 @@ EdbDisasmJMP ( // } else {
// EdbPrintInstructionName (L"32");
// }
- if (Modifiers & CONDITION_M_CONDITIONAL) {
- if (Modifiers & JMP_M_CS) {
+ if ((Modifiers & CONDITION_M_CONDITIONAL) != 0) {
+ if ((Modifiers & JMP_M_CS) != 0) {
EdbPrintInstructionName (L"cs");
} else {
EdbPrintInstructionName (L"cc");
@@ -203,9 +203,9 @@ EdbDisasmJMP ( }
InstructionAddress += 2;
- if (Modifiers & OPCODE_M_IMMDATA64) {
+ if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
EdbPrintData64 (Data64);
} else {
return 0;
@@ -260,8 +260,8 @@ EdbDisasmJMP8 ( *DisasmString = EdbPreInstructionString ();
EdbPrintInstructionName (L"JMP8");
- if (Modifiers & CONDITION_M_CONDITIONAL) {
- if (Modifiers & JMP_M_CS) {
+ if ((Modifiers & CONDITION_M_CONDITIONAL) != 0) {
+ if ((Modifiers & JMP_M_CS) != 0) {
EdbPrintInstructionName (L"cs");
} else {
EdbPrintInstructionName (L"cc");
@@ -322,7 +322,7 @@ EdbDisasmCALL ( // } else {
// EdbPrintInstructionName (L"32");
// }
- if (Operands & OPERAND_M_NATIVE_CALL) {
+ if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
EdbPrintInstructionName (L"EX");
}
// if ((Operands & OPERAND_M_RELATIVE_ADDR) == 0) {
@@ -330,10 +330,10 @@ EdbDisasmCALL ( // }
InstructionAddress += 2;
- if (Modifiers & OPCODE_M_IMMDATA64) {
+ if ((Modifiers & OPCODE_M_IMMDATA64) != 0) {
CopyMem (&Data64, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT64));
Ip = Data64;
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
if (Result == 0) {
EdbPrintData64 (Data64);
@@ -342,7 +342,7 @@ EdbDisasmCALL ( return 0;
}
} else {
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
} else {
Data32 = 0;
@@ -355,20 +355,20 @@ EdbDisasmCALL ( }
if ((Operands & OPERAND_M_INDIRECT1) == 0) {
- if (Operands & OPERAND_M_RELATIVE_ADDR) {
+ if ((Operands & OPERAND_M_RELATIVE_ADDR) != 0) {
Result = EdbFindAndPrintSymbol ((UINTN)(SavedInstructionAddress + Ip + Size));
} else {
Result = EdbFindAndPrintSymbol ((UINTN)Ip);
}
if (Result == 0) {
EdbPrintRegister1 (Operands);
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
EdbPrintImmData32 (Data32);
}
}
} else {
EdbPrintRegister1 (Operands);
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
EdbPrintRawIndexData32 (Data32);
}
}
@@ -453,7 +453,7 @@ EdbDisasmCMP ( Opcode = GET_OPCODE (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -495,9 +495,9 @@ EdbDisasmCMP ( EdbPrintComma ();
EdbPrintRegister2 (Operands);
- if (Modifiers & OPCODE_M_IMMDATA) {
+ if ((Modifiers & OPCODE_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -552,7 +552,7 @@ EdbDisasmUnsignedDataManip ( Opcode = GET_OPCODE (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & DATAMANIP_M_IMMDATA) {
+ if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -613,9 +613,9 @@ EdbDisasmUnsignedDataManip ( EdbPrintRegister2 (Operands);
InstructionAddress += 2;
- if (Modifiers & DATAMANIP_M_IMMDATA) {
+ if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -665,7 +665,7 @@ EdbDisasmSignedDataManip ( Opcode = GET_OPCODE (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & DATAMANIP_M_IMMDATA) {
+ if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -711,9 +711,9 @@ EdbDisasmSignedDataManip ( EdbPrintRegister2 (Operands);
InstructionAddress += 2;
- if (Modifiers & DATAMANIP_M_IMMDATA) {
+ if ((Modifiers & DATAMANIP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -770,26 +770,26 @@ EdbDisasmMOVxx ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
Size = 2;
- if (Modifiers & (OPCODE_M_IMMED_OP1 | OPCODE_M_IMMED_OP2)) {
+ if ((Modifiers & (OPCODE_M_IMMED_OP1 | OPCODE_M_IMMED_OP2)) != 0) {
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
Size += 2;
}
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
Size += 2;
}
- } else if ((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) {
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ } else if (((Opcode <= OPCODE_MOVQD) || (Opcode == OPCODE_MOVND)) != 0) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
Size += 4;
}
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
Size += 4;
}
} else if (Opcode == OPCODE_MOVQQ) {
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
Size += 8;
}
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
Size += 8;
}
}
@@ -841,7 +841,7 @@ EdbDisasmMOVxx ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
@@ -860,7 +860,7 @@ EdbDisasmMOVxx ( EdbPrintComma ();
EdbPrintRegister2 (Operands);
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
if ((Opcode <= OPCODE_MOVQW) || (Opcode == OPCODE_MOVNW)) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
EdbPrintRawIndexData16 (Data16);
@@ -907,10 +907,10 @@ EdbDisasmMOVsnw ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
Size = 2;
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
Size += 2;
}
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
Size += 2;
}
@@ -925,7 +925,7 @@ EdbDisasmMOVsnw ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
@@ -934,9 +934,9 @@ EdbDisasmMOVsnw ( EdbPrintComma ();
EdbPrintRegister2 (Operands);
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -977,10 +977,10 @@ EdbDisasmMOVsnd ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
Size = 2;
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
Size += 4;
}
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
Size += 4;
}
@@ -995,7 +995,7 @@ EdbDisasmMOVsnd ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & OPCODE_M_IMMED_OP1) {
+ if ((Modifiers & OPCODE_M_IMMED_OP1) != 0) {
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
InstructionAddress += 4;
EdbPrintRawIndexData32 (Data32);
@@ -1004,9 +1004,9 @@ EdbDisasmMOVsnd ( EdbPrintComma ();
EdbPrintRegister2 (Operands);
- if (Modifiers & OPCODE_M_IMMED_OP2) {
+ if ((Modifiers & OPCODE_M_IMMED_OP2) != 0) {
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EdbPrintRawIndexData32 (Data32);
} else {
EdbPrintImmDatan (Data32);
@@ -1131,7 +1131,7 @@ EdbDisasmPUSH ( Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1153,9 +1153,9 @@ EdbDisasmPUSH ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT1) {
+ if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -1195,7 +1195,7 @@ EdbDisasmPOP ( Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1217,9 +1217,9 @@ EdbDisasmPOP ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT1) {
+ if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -1274,10 +1274,10 @@ EdbDisasmCMPI ( }
Size = 2;
- if (Operands & OPERAND_M_CMPI_INDEX) {
+ if ((Operands & OPERAND_M_CMPI_INDEX) != 0) {
Size += 2;
}
- if (Modifiers & OPCODE_M_CMPI32_DATA) {
+ if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
Size += 4;
} else {
Size += 2;
@@ -1295,7 +1295,7 @@ EdbDisasmCMPI ( // } else {
// EdbPrintInstructionName (L"32");
// }
- if (Modifiers & OPCODE_M_CMPI32_DATA) {
+ if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
EdbPrintInstructionName (L"d");
} else {
EdbPrintInstructionName (L"w");
@@ -1321,7 +1321,7 @@ EdbDisasmCMPI ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Operands & OPERAND_M_CMPI_INDEX) {
+ if ((Operands & OPERAND_M_CMPI_INDEX) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
@@ -1329,7 +1329,7 @@ EdbDisasmCMPI ( EdbPrintComma ();
- if (Modifiers & OPCODE_M_CMPI32_DATA) {
+ if ((Modifiers & OPCODE_M_CMPI32_DATA) != 0) {
CopyMem (&Data32, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT32));
EdbPrintDatan (Data32);
} else {
@@ -1370,7 +1370,7 @@ EdbDisasmPUSHn ( Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1387,9 +1387,9 @@ EdbDisasmPUSHn ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT1) {
+ if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -1429,7 +1429,7 @@ EdbDisasmPOPn ( Operands = GET_OPERANDS (InstructionAddress);
Modifiers = GET_MODIFIERS (InstructionAddress);
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1446,9 +1446,9 @@ EdbDisasmPOPn ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Modifiers & PUSHPOP_M_IMMDATA) {
+ if ((Modifiers & PUSHPOP_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
- if (Operands & OPERAND_M_INDIRECT1) {
+ if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EdbPrintRawIndexData16 (Data16);
} else {
EdbPrintImmDatan (Data16);
@@ -1491,7 +1491,7 @@ EdbDisasmMOVI ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1540,7 +1540,7 @@ EdbDisasmMOVI ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
@@ -1599,7 +1599,7 @@ EdbDisasmMOVIn ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1634,7 +1634,7 @@ EdbDisasmMOVIn ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
@@ -1696,7 +1696,7 @@ EdbDisasmMOVREL ( Modifiers = GET_MODIFIERS (InstructionAddress);
Operands = GET_OPERANDS (InstructionAddress);
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
Size = 4;
} else {
Size = 2;
@@ -1733,7 +1733,7 @@ EdbDisasmMOVREL ( EdbPrintRegister1 (Operands);
InstructionAddress += 2;
- if (Operands & MOVI_M_IMMDATA) {
+ if ((Operands & MOVI_M_IMMDATA) != 0) {
CopyMem (&Data16, (VOID *)(UINTN)(InstructionAddress), sizeof(UINT16));
InstructionAddress += 2;
EdbPrintRawIndexData16 (Data16);
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.c index 0108870e22..2e001a4a54 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasmSupport.c @@ -270,7 +270,7 @@ EdbPrintRegister1 ( IN UINT8 Operands
)
{
- if (Operands & OPERAND_M_INDIRECT1) {
+ if ((Operands & OPERAND_M_INDIRECT1) != 0) {
EDBSPrintWithOffset (
mInstructionString.Content,
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
@@ -305,7 +305,7 @@ EdbPrintRegister2 ( IN UINT8 Operands
)
{
- if (Operands & OPERAND_M_INDIRECT2) {
+ if ((Operands & OPERAND_M_INDIRECT2) != 0) {
EDBSPrintWithOffset (
mInstructionString.Content,
EDB_INSTRUCTION_CONTENT_MAX_SIZE,
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c index 1a396a4066..bb0626fae7 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c @@ -37,19 +37,19 @@ Xtoi ( //
// skip preceeding white space
//
- while (*Str && *Str == ' ') {
+ while (*Str != '\0' && *Str == ' ') {
Str += 1;
}
//
// skip preceeding zeros
//
- while (*Str && *Str == '0') {
+ while (*Str != '\0' && *Str == '0') {
Str += 1;
}
//
// skip preceeding white space
//
- if (*Str && (*Str == 'x' || *Str == 'X')) {
+ if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
Str += 1;
}
//
@@ -57,7 +57,7 @@ Xtoi ( //
RetVal = 0;
TempChar = *(Str++);
- while (TempChar) {
+ while (TempChar != '\0') {
if (TempChar >= 'a' && TempChar <= 'f') {
TempChar -= 'a' - 'A';
}
@@ -102,19 +102,19 @@ LXtoi ( //
// skip preceeding white space
//
- while (*Str && *Str == ' ') {
+ while (*Str != '\0' && *Str == ' ') {
Str += 1;
}
//
// skip preceeding zeros
//
- while (*Str && *Str == '0') {
+ while (*Str != '\0' && *Str == '0') {
Str += 1;
}
//
// skip preceeding white space
//
- if (*Str && (*Str == 'x' || *Str == 'X')) {
+ if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
Str += 1;
}
//
@@ -122,7 +122,7 @@ LXtoi ( //
RetVal = 0;
TempChar = *(Str++);
- while (TempChar) {
+ while (TempChar != '\0') {
if (TempChar >= 'a' && TempChar <= 'f') {
TempChar -= 'a' - 'A';
}
@@ -169,7 +169,7 @@ Atoi ( //
// skip preceeding white space
//
- while (*Str && *Str == ' ') {
+ while (*Str != '\0' && *Str == ' ') {
Str += 1;
}
//
@@ -177,7 +177,7 @@ Atoi ( //
RetVal = 0;
TempChar = *(Str++);
- while (TempChar) {
+ while (TempChar != '\0') {
if (TempChar >= '0' && TempChar <= '9') {
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
return (UINTN) -1;
@@ -217,19 +217,19 @@ AsciiXtoi ( //
// skip preceeding white space
//
- while (*Str && *Str == ' ') {
+ while (*Str != '\0' && *Str == ' ') {
Str += 1;
}
//
// skip preceeding zeros
//
- while (*Str && *Str == '0') {
+ while (*Str != '\0' && *Str == '0') {
Str += 1;
}
//
// skip preceeding white space
//
- if (*Str && (*Str == 'x' || *Str == 'X')) {
+ if (*Str != '\0' && (*Str == 'x' || *Str == 'X')) {
Str += 1;
}
//
@@ -237,7 +237,7 @@ AsciiXtoi ( //
RetVal = 0;
TempChar = *(Str++);
- while (TempChar) {
+ while (TempChar != '\0') {
if (TempChar >= 'a' && TempChar <= 'f') {
TempChar -= 'a' - 'A';
}
@@ -283,7 +283,7 @@ AsciiAtoi ( //
// skip preceeding white space
//
- while (*Str && *Str == ' ') {
+ while (*Str != '\0' && *Str == ' ') {
Str += 1;
}
//
@@ -291,7 +291,7 @@ AsciiAtoi ( //
RetVal = 0;
TempChar = *(Str++);
- while (TempChar) {
+ while (TempChar != '\0') {
if (TempChar >= '0' && TempChar <= '9') {
if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) {
return (UINTN) -1;
@@ -345,7 +345,7 @@ StrCmpUnicodeAndAscii ( IN CHAR8 *String2
)
{
- while (*String) {
+ while (*String != '\0') {
if (*String != (CHAR16)*String2) {
break;
}
@@ -463,7 +463,7 @@ StrDuplicate ( Size = (StrLen(Src) + 1) * sizeof(CHAR16);
Dest = AllocateZeroPool (Size);
- if (Dest) {
+ if (Dest != NULL) {
CopyMem (Dest, Src, Size);
}
return Dest;
@@ -678,7 +678,7 @@ PatchForStrTokenAfter ( }
*Str = Patch;
- while (*(Str ++)) {
+ while (*(Str ++) != '\0') {
if (*Str == 0) {
*Str = Patch;
} else {
@@ -703,7 +703,7 @@ PatchForStrTokenBefore ( }
Str = Buffer;
- while (*(Str --)) {
+ while (*(Str --) != '\0') {
if ((*Str == 0) || (*Str == Patch)) {
*Str = Patch;
} else {
@@ -920,7 +920,7 @@ PatchForAsciiStrTokenAfter ( }
*Str = Patch;
- while (*(Str ++)) {
+ while (*(Str ++) != '\0') {
if (*Str == 0) {
*Str = Patch;
} else {
@@ -945,7 +945,7 @@ PatchForAsciiStrTokenBefore ( }
Str = Buffer;
- while (*(Str --)) {
+ while (*(Str --) != '\0') {
if ((*Str == 0) || (*Str == Patch)) {
*Str = Patch;
} else {
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c index 42d8086521..21d0dc9838 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportUI.c @@ -50,7 +50,7 @@ WaitForSingleEvent ( EFI_EVENT TimerEvent;
EFI_EVENT WaitList[2];
- if (Timeout) {
+ if (Timeout != 0) {
//
// Create a timer event
//
@@ -204,7 +204,7 @@ Input ( ASSERT (ConIn != NULL);
ASSERT (InStr != NULL);
- if (Prompt) {
+ if (Prompt != NULL) {
ConOut->OutputString (ConOut, Prompt);
}
//
@@ -255,7 +255,7 @@ Input ( break;
case CHAR_BACKSPACE:
- if (StrPos) {
+ if (StrPos != 0) {
//
// If not move back beyond string beginning, move all characters behind
// the current position one character forward
@@ -307,7 +307,7 @@ Input ( //
// Move characters behind current position one character forward
//
- if (Len) {
+ if (Len != 0) {
Update = StrPos;
Delete = 1;
CopyMem (InStr + StrPos, InStr + StrPos + 1, sizeof (CHAR16) * (Len - StrPos));
@@ -320,7 +320,7 @@ Input ( //
// Adjust current cursor position
//
- if (StrPos) {
+ if (StrPos != 0) {
StrPos -= 1;
ConMoveCursorBackward (LineLength, &Column, &Row);
}
@@ -447,7 +447,7 @@ Input ( EDBPrint (InStr + Update);
Len = StrLen (InStr);
- if (Delete) {
+ if (Delete != 0) {
SetMem (InStr + Len, Delete * sizeof (CHAR16), 0x00);
}
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c index a4c51e9b0f..e5d290a2fe 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -2987,7 +2987,7 @@ ExecuteCALL ( Opcode = GETOPCODE (VmPtr);
Operands = GETOPERANDS (VmPtr);
- if (Operands & OPERAND_M_NATIVE_CALL) {
+ if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
EbcDebuggerHookCALLEXStart (VmPtr);
} else {
EbcDebuggerHookCALLStart (VmPtr);
@@ -3094,7 +3094,7 @@ ExecuteCALL ( }
}
- if (Operands & OPERAND_M_NATIVE_CALL) {
+ if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {
EbcDebuggerHookCALLEXEnd (VmPtr);
} else {
EbcDebuggerHookCALLEnd (VmPtr);
|