]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix some silly warnings.
authorRoy Marples <roy@marples.name>
Fri, 28 Feb 2014 10:38:29 +0000 (10:38 +0000)
committerRoy Marples <roy@marples.name>
Fri, 28 Feb 2014 10:38:29 +0000 (10:38 +0000)
dhcp.c
dhcp6.c

diff --git a/dhcp.c b/dhcp.c
index 18d82d1d0ba63fe98d76621a8bce2a75b5aaba02..93bb9b2ef59c0678918fa122666ffbdc1a95207e 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1509,7 +1509,7 @@ send_message(struct interface *iface, int type,
        struct dhcp_state *state = D_STATE(iface);
        struct if_options *ifo = iface->options;
        struct dhcp_message *dhcp;
-       uint8_t *udp;
+       struct udp_dhcp_packet *udp;
        ssize_t len, r;
        struct in_addr from, to;
        in_addr_t a = 0;
@@ -1573,7 +1573,8 @@ send_message(struct interface *iface, int type,
                if (udp == NULL) {
                        syslog(LOG_ERR, "dhcp_makeudppacket: %m");
                } else {
-                       r = ipv4_sendrawpacket(iface, ETHERTYPE_IP, udp, r);
+                       r = ipv4_sendrawpacket(iface, ETHERTYPE_IP,
+                           (uint8_t *)udp, r);
                        free(udp);
                }
                /* If we failed to send a raw packet this normally means
diff --git a/dhcp6.c b/dhcp6.c
index 56e9100d0d5af94e519afea732c5501f72ecb1da..1edf8d69901f1bf5fd228739b1b83c5b676b1a78 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1503,7 +1503,8 @@ dhcp6_findia(struct interface *ifp, const uint8_t *d, size_t l,
                        rebind = ntohl(u32);
                        p += sizeof(u32);
                        ol -= sizeof(u32);
-               }
+               } else
+                       renew = rebind = 0; /* appease gcc */
                if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1)
                        continue;
                if (ifo->ia_type == D6_OPTION_IA_PD) {