]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Clean up bogus Sun CC pointer type mismatches. Clean up signed vs. unsigned charact...
authorTed Lemon <source@isc.org>
Mon, 16 Mar 1998 06:13:01 +0000 (06:13 +0000)
committerTed Lemon <source@isc.org>
Mon, 16 Mar 1998 06:13:01 +0000 (06:13 +0000)
common/icmp.c

index c3c357c042b44a2e0140e9ab5190998462729e07..b5d02f595dc01593713f4312c32d89db9676de06 100644 (file)
@@ -4,7 +4,7 @@
    responses. */
 
 /*
- * Copyright (c) 1997 The Internet Software Consortium.
+ * Copyright (c) 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: icmp.c,v 1.8 1998/01/12 01:00:42 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: icmp.c,v 1.9 1998/03/16 06:13:01 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -86,7 +86,8 @@ void icmp_startup (routep, handler)
                        (char *)&state, sizeof state) < 0)
                error ("Unable to disable SO_DONTROUTE on ICMP socket: %m");
 
-       add_protocol ("icmp", icmp_protocol_fd, icmp_echoreply, handler);
+       add_protocol ("icmp", icmp_protocol_fd,
+                     icmp_echoreply, (void *)handler);
 }
 
 int icmp_echorequest (addr)
@@ -144,7 +145,7 @@ void icmp_echoreply (protocol)
        void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
 
        len = sizeof from;
-       status = recvfrom (protocol -> fd, icbuf, sizeof icbuf, 0,
+       status = recvfrom (protocol -> fd, (char *)icbuf, sizeof icbuf, 0,
                          (struct sockaddr *)&from, &len);
        if (status < 0) {
                warn ("icmp_echoreply: %m");
@@ -170,7 +171,8 @@ void icmp_echoreply (protocol)
 
        /* If we were given a second-stage handler, call it. */
        if (protocol -> local) {
-               handler = protocol -> local;
+               handler = ((void (*) PROTO ((struct iaddr, u_int8_t *, int)))
+                          protocol -> local);
                memcpy (ia.iabuf, &from.sin_addr, sizeof from.sin_addr);
                ia.len = sizeof from.sin_addr;