Skip to content

Commit fa597f3

Browse files
authored
Merge pull request #1685 from Pythonix/patch-4
Unnecessary if-statement removed
2 parents 4671e1d + b8b8192 commit fa597f3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/protocol.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ bool CMessageHeader::IsValid() const
5252
return false;
5353

5454
// Check the command string for errors
55-
if (true)
56-
{
57-
for (const char* p1 = pchCommand; p1 < pchCommand + COMMAND_SIZE; p1++)
55+
for (const char* p1 = pchCommand; p1 < pchCommand + COMMAND_SIZE; p1++)
5856
{
5957
if (*p1 == 0)
6058
{
@@ -66,7 +64,6 @@ bool CMessageHeader::IsValid() const
6664
else if (*p1 < ' ' || *p1 > 0x7E)
6765
return false;
6866
}
69-
}
7067

7168
// Message size
7269
if (nMessageSize > MAX_SIZE)

0 commit comments

Comments
 (0)