diff --git a/src/util-proto-name.c b/src/util-proto-name.c index f9b00f053c..a7954c3020 100644 --- a/src/util-proto-name.c +++ b/src/util-proto-name.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -93,17 +93,11 @@ void SCProtoNameInit() * we have corresponding name entry for this number or not. * * \param proto Protocol number to be validated - * \retval ret On success returns TRUE otherwise FALSE + * \retval ret On success returns true otherwise false */ -uint8_t SCProtoNameValid(uint16_t proto) +bool SCProtoNameValid(uint16_t proto) { - uint8_t ret = FALSE; - - if (proto <= 255 && known_proto[proto] != NULL) { - ret = TRUE; - } - - return ret; + return (proto <= 255 && known_proto[proto] != NULL); } /** diff --git a/src/util-proto-name.h b/src/util-proto-name.h index 7cf69df928..3cd4e27f1d 100644 --- a/src/util-proto-name.h +++ b/src/util-proto-name.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -34,7 +34,7 @@ * in /etc/protocols */ extern char *known_proto[256]; -uint8_t SCProtoNameValid(uint16_t); +bool SCProtoNameValid(uint16_t); void SCProtoNameInit(void); void SCProtoNameDeInit(void);