From: Alan T. DeKok Date: Wed, 23 Oct 2019 02:17:11 +0000 (-0400) Subject: look at variable, not parent flag. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa22af2d979cf54d83ec056c2d09c26628eae29c;p=thirdparty%2Ffreeradius-server.git look at variable, not parent flag. which is still correct, and which also shuts up the static analyzer --- diff --git a/src/protocols/dhcpv6/encode.c b/src/protocols/dhcpv6/encode.c index a89fc6d5e9c..b3a896392f2 100644 --- a/src/protocols/dhcpv6/encode.c +++ b/src/protocols/dhcpv6/encode.c @@ -507,8 +507,8 @@ static inline ssize_t encode_array(uint8_t *out, size_t outlen, /* * Populate the length field */ - if (!da->flags.length) *len_field = htons((uint16_t) slen); - + if (len_field) *len_field = htons((uint16_t) slen); + vp = fr_cursor_current(cursor); if (!vp || (vp->da != da)) break; /* Stop if we have an attribute of a different type */ }