]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should use caddr_t instead of our own types for arp hardware addresses.
authorRoy Marples <roy@marples.name>
Thu, 17 Jan 2008 17:51:00 +0000 (17:51 +0000)
committerRoy Marples <roy@marples.name>
Thu, 17 Jan 2008 17:51:00 +0000 (17:51 +0000)
arp.c

diff --git a/arp.c b/arp.c
index 9680f04fb3732cf1e449a063d97911c4bbea0d21..6698cd6578c17ac1bc897ea0dbc7a1a1b2a0a236 100644 (file)
--- a/arp.c
+++ b/arp.c
 
 /* Linux does not seem to define these handy macros */
 #ifndef ar_sha
-#define ar_sha(ap) (((unsigned char *) ((ap) + 1)) + 0)
-#define ar_spa(ap) (((unsigned char *) ((ap) + 1)) + (ap)->ar_hln)
-#define ar_tha(ap) (((unsigned char *) ((ap) + 1)) + \
+#define ar_sha(ap) (((caddr_t) ((ap) + 1)) + 0)
+#define ar_spa(ap) (((caddr_t) ((ap) + 1)) + (ap)->ar_hln)
+#define ar_tha(ap) (((caddr_t) ((ap) + 1)) + \
                    (ap)->ar_hln + (ap)->ar_pln)
-#define ar_tpa(ap) (((unsigned char *) ((ap) + 1)) + \
+#define ar_tpa(ap) (((caddr_t) ((ap) + 1)) + \
                    2 * (ap)->ar_hln + (ap)->ar_pln)
 #endif
 
@@ -80,7 +80,7 @@ static int send_arp (const interface_t *iface, int op, struct in_addr sip,
 {
        struct arphdr *arp;
        int arpsize = arphdr_len2 (iface->hwlen, sizeof (struct in_addr));
-       char *tha;
+       caddr_t tha;
        int retval;
 
        arp = xmalloc (arpsize);