]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Use UNCONST
authorRoy Marples <roy@marples.name>
Sat, 14 May 2016 10:38:15 +0000 (10:38 +0000)
committerRoy Marples <roy@marples.name>
Sat, 14 May 2016 10:38:15 +0000 (10:38 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 352e7ef8d1cbd69c29b785aa1d1d02bb30edceb1..90f70edec9ec459d48427305a5c513443f8db8b0 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
 #include "compat/bitops.h"
 #endif
 
-#ifndef __UNCONST
-#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
-#endif
-
 /* DHCPCD Project has been assigned an IANA PEN of 40712 */
 #define DHCPCD_IANA_PEN 40712
 
@@ -317,7 +313,7 @@ dhcp6_updateelapsed(struct interface *ifp, struct dhcp6_message *m, size_t len)
        if (co == NULL)
                return -1;
 
-       o = __UNCONST(co);
+       o = UNCONST(co);
        state = D6_STATE(ifp);
        clock_gettime(CLOCK_MONOTONIC, &tv);
        if (state->RTC == 0) {
@@ -951,7 +947,7 @@ dhcp6_update_auth(struct interface *ifp, struct dhcp6_message *m, size_t len)
        if (co == NULL)
                return -1;
 
-       o = __UNCONST(co);
+       o = UNCONST(co);
        state = D6_STATE(ifp);
 
        return dhcp_auth_encode(&ifp->options->auth, state->auth.token,