aboutsummaryrefslogtreecommitdiff
path: root/networking/dnsd.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-12 17:55:51 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-12 17:55:51 +0000
commitdac7ff15b7d32deeeef3d9665744fc5774c21d70 (patch)
tree0e4c34863628d79fdad0c6217f4deb0ca0a91c33 /networking/dnsd.c
parent79865bc5077cf6d17b27e9599921d4c85b1575fd (diff)
downloadbusybox-dac7ff15b7d32deeeef3d9665744fc5774c21d70.tar.gz
- patch from Denis Vlasenko to add and use bb_xsocket() and to use
bb_xopen some more while at it. Also use shorter boilerplate while at it.
Diffstat (limited to 'networking/dnsd.c')
-rw-r--r--networking/dnsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c
index a815860ab..9c5193820 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
/*
* Mini DNS server implementation for busybox
*
@@ -204,8 +205,7 @@ listen_socket(char *iface_addr, int listen_port)
char msg[100];
int s;
int yes = 1;
- if ((s = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
- bb_perror_msg_and_die("socket() failed");
+ s = bb_xsocket(PF_INET, SOCK_DGRAM, 0);
#ifdef SO_REUSEADDR
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&yes, sizeof(yes)) < 0)
bb_perror_msg_and_die("setsockopt() failed");