From: Alan T. DeKok Date: Fri, 18 Mar 2022 13:16:04 +0000 (-0400) Subject: move code to shut up clang scan X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5da513111d127aadcc5dd8f62d0fd9bad19fc27e;p=thirdparty%2Ffreeradius-server.git move code to shut up clang scan --- diff --git a/src/protocols/dhcpv4/decode.c b/src/protocols/dhcpv4/decode.c index f894e882f8b..3dc89dafe11 100644 --- a/src/protocols/dhcpv4/decode.c +++ b/src/protocols/dhcpv4/decode.c @@ -220,6 +220,8 @@ static ssize_t decode_value(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t if (exact && (data_len > 5)) goto raw; vp->vp_ip.prefix = *p; + mask = ~(uint32_t) 0; + mask <<= (32 - vp->vp_ip.prefix); if (*p > 24) { if (data_len < 5) goto raw; @@ -249,9 +251,6 @@ static ssize_t decode_value(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t ipaddr = 0; } - mask = ~(uint32_t) 0; - mask <<= (32 - vp->vp_ip.prefix); - vp->vp_ipv4addr = htonl(ipaddr & mask); break; }