From e8da500388dde0ec6a2649881d688d83fac27577 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Wed, 3 Jul 2013 21:57:24 +0000 Subject: [PATCH] MFp4 @229473: No caller checks send_packet() return value, so make it void. Reviewed by: brooks Sponsored by: The FreeBSD Foundation --- sbin/dhclient/bpf.c | 3 +-- sbin/dhclient/dhclient.c | 6 +++--- sbin/dhclient/dhcpd.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c index 920932e0b12b..a840294940e8 100644 --- a/sbin/dhclient/bpf.c +++ b/sbin/dhclient/bpf.c @@ -249,7 +249,7 @@ if_register_receive(struct interface_info *info) error("Cannot lock bpf"); } -ssize_t +void send_packet(struct interface_info *interface, struct dhcp_packet *raw, size_t len, struct in_addr from, struct in_addr to) { @@ -290,7 +290,6 @@ send_packet(struct interface_info *interface, struct dhcp_packet *raw, if (result < 0) warning("send_packet: %m"); - return (result); } ssize_t diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index f17c11e27697..2de8d39cbf95 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1225,7 +1225,7 @@ send_discover(void *ipp) (int)ip->client->interval); /* Send out a packet. */ - (void)send_packet(ip, &ip->client->packet, ip->client->packet_length, + send_packet(ip, &ip->client->packet, ip->client->packet_length, inaddr_any, inaddr_broadcast); add_timeout(cur_time + ip->client->interval, send_discover, ip); @@ -1450,7 +1450,7 @@ send_request(void *ipp) REMOTE_PORT); /* Send out a packet. */ - (void) send_packet(ip, &ip->client->packet, ip->client->packet_length, + send_packet(ip, &ip->client->packet, ip->client->packet_length, from, to); add_timeout(cur_time + ip->client->interval, send_request, ip); @@ -1465,7 +1465,7 @@ send_decline(void *ipp) inet_ntoa(inaddr_broadcast), REMOTE_PORT); /* Send out a packet. */ - (void) send_packet(ip, &ip->client->packet, ip->client->packet_length, + send_packet(ip, &ip->client->packet, ip->client->packet_length, inaddr_any, inaddr_broadcast); } diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index d6426926581c..1d0898d9637d 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -300,7 +300,7 @@ struct hash_bucket *new_hash_bucket(void); int if_register_bpf(struct interface_info *); void if_register_send(struct interface_info *); void if_register_receive(struct interface_info *); -ssize_t send_packet(struct interface_info *, struct dhcp_packet *, size_t, +void send_packet(struct interface_info *, struct dhcp_packet *, size_t, struct in_addr, struct in_addr); ssize_t receive_packet(struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *);