Add explicit comparisons where we were implicitly checking for non-zero

* This fixes some warnings from PVS Studio, though none of these checks were
  actually wrong it's better to be explicit.
This commit is contained in:
baldurk
2020-01-21 18:28:56 +00:00
parent 421201df7a
commit 68b9d223b0
23 changed files with 42 additions and 45 deletions
+1 -1
View File
@@ -413,7 +413,7 @@ struct LogLine
if(idx + 64 > line.length())
return false;
if(strncmp(&line[idx], "RDOC ", 5))
if(strncmp(&line[idx], "RDOC ", 5) != 0)
return false;
idx += 5;
+1 -1
View File
@@ -63,7 +63,7 @@ Connection::Connection(Network::Socket *sock)
char response[15] = {};
reader.Read(response, handshakeLength);
if(memcmp(handshake, response, 14))
if(memcmp(handshake, response, 14) != 0)
{
RDCERR("handshake failed - received >%s< - expected >%s<", response, handshake);
error = true;