From 028d3b7baed3988ecb2d87883b46f8d92c89620c Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Sat, 13 Nov 2010 12:00:06 -0500 Subject: [PATCH] Clean up send_renew() a bit. --- ndhc/clientpacket.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ndhc/clientpacket.c b/ndhc/clientpacket.c index ecff649..9a3b20f 100644 --- a/ndhc/clientpacket.c +++ b/ndhc/clientpacket.c @@ -149,7 +149,6 @@ int send_selecting(uint32_t xid, uint32_t server, uint32_t requested) int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) { struct dhcpMessage packet; - int ret = 0; init_packet(&packet, DHCPREQUEST); packet.xid = xid; @@ -158,10 +157,10 @@ int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) add_requests(&packet); log_line("Sending renew..."); if (server) - ret = kernel_packet(&packet, ciaddr, CLIENT_PORT, server, SERVER_PORT); + return kernel_packet(&packet, ciaddr, CLIENT_PORT, + server, SERVER_PORT); else - ret = bcast_raw_packet(&packet); - return ret; + return bcast_raw_packet(&packet); } /* Unicasts a DHCP release message */