From e39e3466d2d38cdfe83447f391b550e607bc3ce8 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sun, 20 Nov 2022 22:43:59 +0100 Subject: Fix all debug mode warnings --- lib/parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/parse.c') diff --git a/lib/parse.c b/lib/parse.c index 48d71be..4d2d8b3 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -280,7 +280,8 @@ static int parse_portname(struct ipset_session *session, const char *str, uint16_t *port, const char *proto) { - char *saved, *tmp, *protoname; + char *saved, *tmp; + const char *protoname; const struct protoent *protoent; struct servent *service; uint8_t protonum = 0; @@ -292,7 +293,7 @@ parse_portname(struct ipset_session *session, const char *str, if (tmp == NULL) goto error; - protoname = (char *)proto; + protoname = proto; if (string_to_u8(session, proto, &protonum, IPSET_WARNING) == 0) { protoent = getprotobynumber(protonum); if (protoent == NULL) -- cgit v1.2.3