]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix gcc build errors.
authorRoy Marples <roy@marples.name>
Mon, 14 Jul 2014 12:55:19 +0000 (12:55 +0000)
committerRoy Marples <roy@marples.name>
Mon, 14 Jul 2014 12:55:19 +0000 (12:55 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 453bafbc38520c21244079af98f1d551167f2322..158dfb9ff03fb03201571c66afbfd7e17d8cb2c4 100644 (file)
--- 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));