From: Roy Marples Date: Mon, 14 Jul 2014 12:55:19 +0000 (+0000) Subject: Fix gcc build errors. X-Git-Tag: v6.4.2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d73fef920a58f0b23093fdb2c18fe82a612e51bd;p=thirdparty%2Fdhcpcd.git Fix gcc build errors. --- diff --git a/dhcp6.c b/dhcp6.c index 453bafbc..158dfb9f 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -1628,7 +1628,7 @@ dhcp6_findna(struct interface *ifp, uint16_t ot, const uint8_t *iaid, continue; } p = D6_COPTION_DATA(o); - iap = (struct dhcp6_ia_addr *)D6_COPTION_DATA(o); + iap = (const struct dhcp6_ia_addr *)D6_COPTION_DATA(o); p += sizeof(in6); a = dhcp6_findaddr(ifp, &iap->addr); if (a == NULL) { @@ -1690,7 +1690,7 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid, char iabuf[INET6_ADDRSTRLEN]; const char *ia; int i; - uint8_t u8, len, *pw; + uint8_t u8, *pw; size_t off; uint16_t ol; const struct dhcp6_pd_addr *pdp; @@ -1751,7 +1751,7 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid, state->expire = a->prefix_vltime; i++; - p = D6_OPTION_DATA(o) + sizeof(pdp); + p = D6_COPTION_DATA(o) + sizeof(pdp); ol -= sizeof(pdp); ex = dhcp6_findoption(D6_OPTION_PD_EXCLUDE, p, ol); a->prefix_exclude_len = 0; @@ -1788,7 +1788,6 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid, a->prefix_exclude_len = 0; continue; } - len = a->prefix_len / NBBY; u8 = a->prefix_len % NBBY; memcpy(&a->prefix_exclude, &a->prefix, sizeof(a->prefix_exclude));