Skip to content

Commit

Permalink
SML parser: remove commented-out code
Browse files Browse the repository at this point in the history
the comparison is part of the original library code, but the compiler
rightfully complains that the comparison byte <= 0xFF is always true,
since byte is uint8_t. the comparison was commented out, and is now
removed.
  • Loading branch information
schlimmchen committed Jun 27, 2024
1 parent 1afa9a6 commit 7f724ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SMLParser/sml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void checkMagicByte(unsigned char &byte)
// Datatype Octet String
setState(SML_HDATA, (byte & 0x0F) << 4);
}
else if (byte >= 0xF0 /*&& byte <= 0xFF*/) {
else if (byte >= 0xF0) {
/* Datatype List of ...*/
setState(SML_LISTEXTENDED, (byte & 0x0F) << 4);
}
Expand Down

0 comments on commit 7f724ce

Please sign in to comment.