diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index d1867e9..ea29131 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -23,15 +23,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <string.h>
-#include <arpa/inet.h>
 #include <net/if.h>
-#include <errno.h>
 #include <features.h>
 #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
 #include <netpacket/packet.h>
@@ -43,7 +35,7 @@
 #endif
 
 #include "common.h"
-#include "socket.h"
+
 
 int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
 {
@@ -52,44 +44,42 @@
 	struct sockaddr_in *our_ip;
 
 	memset(&ifr, 0, sizeof(struct ifreq));
-	if((fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) >= 0) {
-		ifr.ifr_addr.sa_family = AF_INET;
-		strcpy(ifr.ifr_name, interface);
-
-		if (addr) {
-			if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
-				our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
-				*addr = our_ip->sin_addr.s_addr;
-				DEBUG("%s (our ip) = %s", ifr.ifr_name, inet_ntoa(our_ip->sin_addr));
-			} else {
-				bb_perror_msg("SIOCGIFADDR failed, is the interface up and configured?");
-				close(fd);
-				return -1;
-			}
-		}
-
-		if (ioctl(fd, SIOCGIFINDEX, &ifr) == 0) {
-			DEBUG("adapter index %d", ifr.ifr_ifindex);
-			*ifindex = ifr.ifr_ifindex;
-		} else {
-			bb_perror_msg("SIOCGIFINDEX failed");
-			close(fd);
-			return -1;
-		}
-		if (ioctl(fd, SIOCGIFHWADDR, &ifr) == 0) {
-			memcpy(arp, ifr.ifr_hwaddr.sa_data, 6);
-			DEBUG("adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x",
-				arp[0], arp[1], arp[2], arp[3], arp[4], arp[5]);
-		} else {
-			bb_perror_msg("SIOCGIFHWADDR failed");
-			close(fd);
-			return -1;
-		}
-	} else {
+	fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
+	if (fd < 0) {
 		bb_perror_msg("socket failed");
 		return -1;
 	}
-	close(fd);
+
+	ifr.ifr_addr.sa_family = AF_INET;
+	strcpy(ifr.ifr_name, interface);
+	if (addr) {
+		if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
+			bb_perror_msg("SIOCGIFADDR failed, is the interface up and configured?");
+			close(fd);
+			return -1;
+		}
+		our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
+		*addr = our_ip->sin_addr.s_addr;
+		DEBUG("%s (our ip) = %s", ifr.ifr_name, inet_ntoa(our_ip->sin_addr));
+	}
+
+	if (ioctl(fd, SIOCGIFINDEX, &ifr) == 0) {
+		bb_perror_msg("SIOCGIFINDEX failed");
+		close(fd);
+		return -1;
+	}
+
+	DEBUG("adapter index %d", ifr.ifr_ifindex);
+	*ifindex = ifr.ifr_ifindex;
+	if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) {
+		bb_perror_msg("SIOCGIFHWADDR failed");
+		close(fd);
+		return -1;
+	}
+
+	memcpy(arp, ifr.ifr_hwaddr.sa_data, 6);
+	DEBUG("adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x",
+		arp[0], arp[1], arp[2], arp[3], arp[4], arp[5]);
 	return 0;
 }
 
@@ -102,7 +92,8 @@
 	int n = 1;
 
 	DEBUG("Opening listen socket on 0x%08x:%d %s", ip, port, inf);
-	if ((fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
+	fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+	if (fd < 0) {
 		bb_perror_msg("socket");
 		return -1;
 	}
