From 84c75a7b9a8aeb60506454260f9c98454ffb8ab5 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 27 Apr 2021 19:58:32 +0200 Subject: [PATCH] Codechange: be explicit in pointer comparisons --- src/network/core/game_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/core/game_info.cpp b/src/network/core/game_info.cpp index bea687af80..b664bb580a 100644 --- a/src/network/core/game_info.cpp +++ b/src/network/core/game_info.cpp @@ -103,7 +103,7 @@ bool IsNetworkCompatibleVersion(const char *other) const char *hash1 = ExtractNetworkRevisionHash(GetNetworkRevisionString()); 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; } /**