From dbac8ad71c3c418fd8a62c08211885a38177b725 Mon Sep 17 00:00:00 2001 From: Phil Oester Date: Thu, 20 Jul 2006 17:01:54 +0000 Subject: reduce parse_*_port duplication (Phil Oester ) The below patch (dependent upon my 'reduce service_to_port duplication' patch) centralizes the parse_*_port functions into parse_port. --- extensions/libipt_mport.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'extensions/libipt_mport.c') diff --git a/extensions/libipt_mport.c b/extensions/libipt_mport.c index e6975d03..624de134 100644 --- a/extensions/libipt_mport.c +++ b/extensions/libipt_mport.c @@ -33,19 +33,6 @@ static struct option opts[] = { {0} }; -static u_int16_t -parse_port(const char *port, const char *proto) -{ - unsigned int portnum; - - if (string_to_number(port, 0, 65535, &portnum) != -1 || - (portnum = service_to_port(port, proto)) != -1) - return (u_int16_t)portnum; - - exit_error(PARAMETER_PROBLEM, - "invalid port/service `%s' specified", port); -} - static void parse_multi_ports(const char *portstring, struct ipt_mport *minfo, const char *proto) -- cgit v1.2.3