-/* 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
* 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);
}
/**
-/* 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
* in /etc/protocols */
extern char *known_proto[256];
-uint8_t SCProtoNameValid(uint16_t);
+bool SCProtoNameValid(uint16_t);
void SCProtoNameInit(void);
void SCProtoNameDeInit(void);