diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-05-07 00:05:24 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-05-09 00:13:13 +0200 |
commit | dd6e4b90b5b2dbc2bbaac5008e26949a18478197 (patch) | |
tree | ae4e8b4d069177c7143f64935aad4983237bfc5f /extensions/libxt_multiport.c | |
parent | e1639b0bc28420ca01d733749c8db16d5a3fbd0c (diff) |
extensions: const annotations
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_multiport.c')
-rw-r--r-- | extensions/libxt_multiport.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c index 163c7dc5..7fa537e0 100644 --- a/extensions/libxt_multiport.c +++ b/extensions/libxt_multiport.c @@ -53,7 +53,7 @@ static const struct option multiport_opts[] = { XT_GETOPT_TABLEEND, }; -static char * +static const char * proto_to_name(uint8_t proto) { switch (proto) { @@ -135,7 +135,7 @@ parse_multi_ports_v1(const char *portstring, static const char * check_proto(uint16_t pnum, uint8_t invflags) { - char *proto; + const char *proto; if (invflags & XT_INV_PROTO) xtables_error(PARAMETER_PROBLEM, @@ -285,10 +285,10 @@ static void multiport_check(unsigned int flags) xtables_error(PARAMETER_PROBLEM, "multiport expection an option"); } -static char * +static const char * port_to_service(int port, uint8_t proto) { - struct servent *service; + const struct servent *service; if ((service = getservbyport(htons(port), proto_to_name(proto)))) return service->s_name; @@ -299,7 +299,7 @@ port_to_service(int port, uint8_t proto) static void print_port(uint16_t port, uint8_t protocol, int numeric) { - char *service; + const char *service; if (numeric || (service = port_to_service(port, protocol)) == NULL) printf("%u", port); |