diff options
Diffstat (limited to 'networking/nc.c')
-rw-r--r-- | networking/nc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/nc.c b/networking/nc.c index 117bbe20e..3f4149e14 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -54,10 +54,10 @@ int nc_main(int argc, char **argv) | |||
54 | alarm(wsecs); | 54 | alarm(wsecs); |
55 | } | 55 | } |
56 | 56 | ||
57 | if (infile) cfd = bb_xopen(infile, O_RDWR); | 57 | if (infile) cfd = xopen(infile, O_RDWR); |
58 | else { | 58 | else { |
59 | opt = 1; | 59 | opt = 1; |
60 | sfd = bb_xsocket(AF_INET, SOCK_STREAM, 0); | 60 | sfd = xsocket(AF_INET, SOCK_STREAM, 0); |
61 | fcntl(sfd, F_SETFD, FD_CLOEXEC); | 61 | fcntl(sfd, F_SETFD, FD_CLOEXEC); |
62 | setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof (opt)); | 62 | setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof (opt)); |
63 | address.sin_family = AF_INET; | 63 | address.sin_family = AF_INET; |
@@ -67,13 +67,13 @@ int nc_main(int argc, char **argv) | |||
67 | if (lport != 0) { | 67 | if (lport != 0) { |
68 | address.sin_port = lport; | 68 | address.sin_port = lport; |
69 | 69 | ||
70 | bb_xbind(sfd, (struct sockaddr *) &address, sizeof(address)); | 70 | xbind(sfd, (struct sockaddr *) &address, sizeof(address)); |
71 | } | 71 | } |
72 | 72 | ||
73 | if (do_listen) { | 73 | if (do_listen) { |
74 | socklen_t addrlen = sizeof(address); | 74 | socklen_t addrlen = sizeof(address); |
75 | 75 | ||
76 | bb_xlisten(sfd, do_listen); | 76 | xlisten(sfd, do_listen); |
77 | 77 | ||
78 | // If we didn't specify a port number, query and print it to stderr. | 78 | // If we didn't specify a port number, query and print it to stderr. |
79 | 79 | ||