mirror of
https://github.com/Dasharo/edk2.git
synced 2026-06-13 10:16:24 -07:00
33219cef73
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>