Debugger: Fix some broken comparisons.

* Missing parentheses in integer comparison inversion
 * !=, not ! at the beginning of expression

Spotted by Clang.
This commit is contained in:
Augustin Cavalier 2018-06-21 22:05:27 -04:00
parent 582afd9a7f
commit 4215eb6003
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ ElfFile::Init(const char* fileName)
return bytesRead < 0 ? errno : B_ERROR; return bytesRead < 0 ? errno : B_ERROR;
// magic // magic
if (!memcmp(elfIdent, ELFMAG, 4) == 0) if (!(memcmp(elfIdent, ELFMAG, 4) == 0))
return B_ERROR; return B_ERROR;
// endianess // endianess

View File

@ -63,7 +63,7 @@ FunctionID::ComputeHashValue() const
bool bool
FunctionID::IsValid() const FunctionID::IsValid() const
{ {
return !fPath.Length() == 0 && !fFunctionName.Length() == 0; return fPath.Length() != 0 && fFunctionName.Length() != 0;
} }