diff --git a/Packet++/src/LdapLayer.cpp b/Packet++/src/LdapLayer.cpp index c123fc0f2d..0a63319983 100644 --- a/Packet++/src/LdapLayer.cpp +++ b/Packet++/src/LdapLayer.cpp @@ -671,7 +671,7 @@ namespace pcpp LdapSearchRequestLayer::SearchRequestScope LdapSearchRequestLayer::SearchRequestScope::fromUintValue(uint8_t value) { - if (value >= 0 && value <= 2) + if (value <= 2) { return static_cast(value); } @@ -686,7 +686,7 @@ namespace pcpp LdapSearchRequestLayer::DerefAliases LdapSearchRequestLayer::DerefAliases::fromUintValue(uint8_t value) { - if (value >= 0 && value <= 3) + if (value <= 3) { return static_cast(value); }