aboutsummaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/nc.c b/networking/nc.c
index 3f4149e14..f8b3fb2dd 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -1,9 +1,9 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* nc: mini-netcat - built from the ground up for LRP 2/* nc: mini-netcat - built from the ground up for LRP
3 * 3 *
4 * Copyright (C) 1998, 1999 Charles P. Wright 4 * Copyright (C) 1998, 1999 Charles P. Wright
5 * Copyright (C) 1998 Dave Cinege 5 * Copyright (C) 1998 Dave Cinege
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 */ 8 */
9 9
@@ -25,7 +25,7 @@ int nc_main(int argc, char **argv)
25 25
26 memset(&address, 0, sizeof(address)); 26 memset(&address, 0, sizeof(address));
27 27
28 if (ENABLE_NC_SERVER || ENABLE_NC_EXTRA) { 28 if (ENABLE_NC_SERVER || ENABLE_NC_EXTRA) {
29 while ((opt = getopt(argc, argv, "lp:" USE_NC_EXTRA("i:ew:f:"))) > 0) { 29 while ((opt = getopt(argc, argv, "lp:" USE_NC_EXTRA("i:ew:f:"))) > 0) {
30 if (ENABLE_NC_SERVER && opt=='l') do_listen++; 30 if (ENABLE_NC_SERVER && opt=='l') do_listen++;
31 else if (ENABLE_NC_SERVER && opt=='p') 31 else if (ENABLE_NC_SERVER && opt=='p')
@@ -40,7 +40,7 @@ int nc_main(int argc, char **argv)
40 } 40 }
41 } 41 }
42 42
43 43
44 // For listen or file we need zero arguments, dialout is 2. 44 // For listen or file we need zero arguments, dialout is 2.
45 // For exec we need at least one more argument at the end, more ok 45 // For exec we need at least one more argument at the end, more ok
46 46
@@ -53,7 +53,7 @@ int nc_main(int argc, char **argv)
53 signal(SIGALRM, timeout); 53 signal(SIGALRM, timeout);
54 alarm(wsecs); 54 alarm(wsecs);
55 } 55 }
56 56
57 if (infile) cfd = xopen(infile, O_RDWR); 57 if (infile) cfd = xopen(infile, O_RDWR);
58 else { 58 else {
59 opt = 1; 59 opt = 1;
@@ -132,7 +132,7 @@ repeatyness:
132 } 132 }
133 133
134 // Select loop copying stdin to cfd, and cfd to stdout. 134 // Select loop copying stdin to cfd, and cfd to stdout.
135 135
136 FD_ZERO(&readfds); 136 FD_ZERO(&readfds);
137 FD_SET(cfd, &readfds); 137 FD_SET(cfd, &readfds);
138 FD_SET(STDIN_FILENO, &readfds); 138 FD_SET(STDIN_FILENO, &readfds);