Fix logic bug found by clang10

proto can never be <0 and >255
master
Philipp Urlbauer 2020-04-22 14:20:18 +02:00 committed by Lothar Braun
parent 6c1a175511
commit 5b2cf7bbe2
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ int parseProtoPattern(char* s, IpfixRecord::Data** fdata, InformationElement::Ie
if (proto == -1)
{
proto = atoi(s);
if((proto < 0) && (proto > 255)) return -1;
if((proto < 0) || (proto > 255)) return -1;
}
*length = 1;