From: Alan T. DeKok Date: Mon, 11 Apr 2022 23:50:21 +0000 (-0400) Subject: remove dead code. CID #1504044 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=997c9104f5e74e3c526804ce68a7537f176cb0ff;p=thirdparty%2Ffreeradius-server.git remove dead code. CID #1504044 --- diff --git a/src/lib/util/inet.c b/src/lib/util/inet.c index 67616238dc4..b8056669648 100644 --- a/src/lib/util/inet.c +++ b/src/lib/util/inet.c @@ -674,7 +674,7 @@ int fr_inet_pton6(fr_ipaddr_t *out, char const *value, ssize_t inlen, bool resol * Parse scope. */ prefix = strtoul(p, &eptr, 10); - if (prefix > 128) { + if (prefix > UINT32_MAX) { fr_strerror_printf("Invalid scope ID \"%s\". Should be between 0-2^32-1", p); return -1; } @@ -684,11 +684,6 @@ int fr_inet_pton6(fr_ipaddr_t *out, char const *value, ssize_t inlen, bool resol return -1; } - if (prefix > UINT32_MAX) { - fr_strerror_printf("Invalid scope ID \"%s\"", p); - return -1; - } - return 0; }