From: Roy Marples Date: Fri, 15 May 2015 14:58:04 +0000 (+0000) Subject: Fix an analyzer error. X-Git-Tag: v6.9.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=519ddeb3887d00a9b1d3232cbbe993f0e8e676ac;p=thirdparty%2Fdhcpcd.git Fix an analyzer error. --- diff --git a/ipv6nd.c b/ipv6nd.c index 4f389dba..6bb9b0fe 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -1294,10 +1294,9 @@ ipv6nd_env(char **env, const char *prefix, const struct interface *ifp) /* Unlike DHCP, ND6 options *may* occur more than once. * There is also no provision for option concatenation * unlike DHCP. */ - len = rap->data_len; - if (ND_CFIRST_OPTION(rap)) - len -= (size_t)((const uint8_t *)ND_CFIRST_OPTION(rap) - - rap->data); + len = rap->data_len - + ((size_t)((const uint8_t *)ND_CFIRST_OPTION(rap) - + rap->data)); for (o = ND_CFIRST_OPTION(rap); len >= (ssize_t)sizeof(*o);