diff options
| author | Aaron Pop <aaronpop@microsoft.com> | 2025-10-22 21:33:02 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-11-23 03:23:22 +0300 |
| commit | 33219cef7344efa4fb2d2f4c85e9e47e28d38216 (patch) | |
| tree | 027141c4bb06627f8028725fe939cb8d71c2826c /MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h | |
| parent | 6d4fbc012fb196ddaff32e48f0c0a57307bf1729 (diff) | |
| download | edk2-33219cef7344efa4fb2d2f4c85e9e47e28d38216.tar.xz | |
MdeModulePkg: Fix useless tests.
https://github.com/github/codeql/blob/codeql-cli-2.7.3/java/ql/src/Language%20Abuse/UselessNullCheck.qhelp
These are all recognized as useless checks.
if (*TempString != L'\0' && *TempString == L'\\') {
if ((*FilePath != L'\0') && (*FilePath == L'\\')) {
while (*Str != '\0' && *Str == ' ') {
while (*Str != '\0' && *Str == '0') {
if ((*Str != '\0') && ((*Str == 'x') || (*Str == 'X'))) {
while (*Str != '\0' && *Str == ' ') {
For all of these cases, they are checking if the variable
is not nil before they check if the character matches an exact character.
If the variable matches the exact character, but that virtue,
it will not be nil.
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h')
0 files changed, 0 insertions, 0 deletions
