From 29d4ebe6426bb33a07a6b1b749240975313bbcfd Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Mon, 16 Mar 1998 06:13:01 +0000 Subject: [PATCH] Clean up bogus Sun CC pointer type mismatches. Clean up signed vs. unsigned character pointer mismatches. --- common/icmp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/common/icmp.c b/common/icmp.c index c3c357c04..b5d02f595 100644 --- a/common/icmp.c +++ b/common/icmp.c @@ -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; -- 2.47.3