mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 01:49:10 +00:00
Codechange: be explicit in pointer comparisons
This commit is contained in:
committed by
Charles Pigott
parent
cae0b46e38
commit
32ead3aba6
@@ -103,7 +103,7 @@ bool IsNetworkCompatibleVersion(const char *other)
|
|||||||
|
|
||||||
const char *hash1 = ExtractNetworkRevisionHash(GetNetworkRevisionString());
|
const char *hash1 = ExtractNetworkRevisionHash(GetNetworkRevisionString());
|
||||||
const char *hash2 = ExtractNetworkRevisionHash(other);
|
const char *hash2 = ExtractNetworkRevisionHash(other);
|
||||||
return hash1 && hash2 && (strncmp(hash1, hash2, GITHASH_SUFFIX_LEN) == 0);
|
return hash1 != nullptr && hash2 != nullptr && strncmp(hash1, hash2, GITHASH_SUFFIX_LEN) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user