Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2013 21:57:24 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252618 - head/sbin/dhclient
Message-ID:  <201307032157.r63LvOr9031696@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Jul  3 21:57:24 2013
New Revision: 252618
URL: http://svnweb.freebsd.org/changeset/base/252618

Log:
  MFp4 @229473:
  
  No caller checks send_packet() return value, so make it void.
  
  Reviewed by:	brooks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sbin/dhclient/bpf.c
  head/sbin/dhclient/dhclient.c
  head/sbin/dhclient/dhcpd.h

Modified: head/sbin/dhclient/bpf.c
==============================================================================
--- head/sbin/dhclient/bpf.c	Wed Jul  3 21:56:25 2013	(r252617)
+++ head/sbin/dhclient/bpf.c	Wed Jul  3 21:57:24 2013	(r252618)
@@ -249,7 +249,7 @@ if_register_receive(struct interface_inf
 		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 *inter
 
 	if (result < 0)
 		warning("send_packet: %m");
-	return (result);
 }
 
 ssize_t

Modified: head/sbin/dhclient/dhclient.c
==============================================================================
--- head/sbin/dhclient/dhclient.c	Wed Jul  3 21:56:25 2013	(r252617)
+++ head/sbin/dhclient/dhclient.c	Wed Jul  3 21:57:24 2013	(r252618)
@@ -1225,7 +1225,7 @@ again:
 	    (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 @@ cancel:
 	    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);
 }
 

Modified: head/sbin/dhclient/dhcpd.h
==============================================================================
--- head/sbin/dhclient/dhcpd.h	Wed Jul  3 21:56:25 2013	(r252617)
+++ head/sbin/dhclient/dhcpd.h	Wed Jul  3 21:57:24 2013	(r252618)
@@ -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 *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307032157.r63LvOr9031696>