diff options
author | Bernhard Reutner-Fischer | 2006-04-12 17:55:51 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-04-12 17:55:51 +0000 |
commit | dac7ff15b7d32deeeef3d9665744fc5774c21d70 (patch) | |
tree | 0e4c34863628d79fdad0c6217f4deb0ca0a91c33 /networking/telnetd.c | |
parent | 79865bc5077cf6d17b27e9599921d4c85b1575fd (diff) | |
download | busybox-dac7ff15b7d32deeeef3d9665744fc5774c21d70.zip busybox-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/telnetd.c')
-rw-r--r-- | networking/telnetd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c index 8943b2e..3e4b42c 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -1,10 +1,9 @@ -/* $Id: telnetd.c,v 1.13 2004/09/14 17:24:58 bug1 Exp $ - * +/* vi:set ts=4:*/ +/* * Simple telnet server * Bjorn Wesen, Axis Communications AB (bjornw@axis.com) * - * This file is distributed under the Gnu Public License (GPL), - * please see the file LICENSE for further information. + * Licensed under GPL, see file LICENSE in this tarball for details. * * --------------------------------------------------------------------------- * (C) Copyright 2000, Axis Communications AB, LUND, SWEDEN @@ -446,10 +445,7 @@ telnetd_main(int argc, char **argv) /* Grab a TCP socket. */ - master_fd = socket(SOCKET_TYPE, SOCK_STREAM, 0); - if (master_fd < 0) { - bb_perror_msg_and_die("socket"); - } + master_fd = bb_xsocket(SOCKET_TYPE, SOCK_STREAM, 0); (void)setsockopt(master_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); /* Set it to listen to specified port. */ |