diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2005-05-07 06:45:29 +0000 |
|---|---|---|
| committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-07 06:45:29 +0000 |
| commit | 9c85ecdef4bfdc1fa939cebf5da00ef2864a9044 (patch) | |
| tree | 6b95c7073666c81efe7eb991951b947191d06632 | |
| parent | 7dc7f402a7d8237d053376dc783d6fe9599ab901 (diff) | |
| download | busybox-w32-9c85ecdef4bfdc1fa939cebf5da00ef2864a9044.tar.gz busybox-w32-9c85ecdef4bfdc1fa939cebf5da00ef2864a9044.tar.bz2 busybox-w32-9c85ecdef4bfdc1fa939cebf5da00ef2864a9044.zip | |
use shared busybox error messages to save a few bytes
| -rw-r--r-- | networking/nc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/nc.c b/networking/nc.c index bb6373fd3..58cd39fac 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
| @@ -85,7 +85,7 @@ int nc_main(int argc, char **argv) | |||
| 85 | #ifdef CONFIG_NC_GAPING_SECURITY_HOLE | 85 | #ifdef CONFIG_NC_GAPING_SECURITY_HOLE |
| 86 | if (pr00gie) { | 86 | if (pr00gie) { |
| 87 | /* won't need stdin */ | 87 | /* won't need stdin */ |
| 88 | close (STDIN_FILENO); | 88 | close(STDIN_FILENO); |
| 89 | } | 89 | } |
| 90 | #endif /* CONFIG_NC_GAPING_SECURITY_HOLE */ | 90 | #endif /* CONFIG_NC_GAPING_SECURITY_HOLE */ |
| 91 | 91 | ||
| @@ -95,8 +95,8 @@ int nc_main(int argc, char **argv) | |||
| 95 | if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) | 95 | if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) |
| 96 | bb_perror_msg_and_die("socket"); | 96 | bb_perror_msg_and_die("socket"); |
| 97 | x = 1; | 97 | x = 1; |
| 98 | if (setsockopt (sfd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)) == -1) | 98 | if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)) == -1) |
| 99 | bb_perror_msg_and_die ("reuseaddr failed"); | 99 | bb_perror_msg_and_die("reuseaddr"); |
| 100 | address.sin_family = AF_INET; | 100 | address.sin_family = AF_INET; |
| 101 | 101 | ||
| 102 | if (wsecs) { | 102 | if (wsecs) { |
| @@ -168,7 +168,7 @@ int nc_main(int argc, char **argv) | |||
| 168 | for (fd = 0; fd < FD_SETSIZE; fd++) { | 168 | for (fd = 0; fd < FD_SETSIZE; fd++) { |
| 169 | if (FD_ISSET(fd, &testfds)) { | 169 | if (FD_ISSET(fd, &testfds)) { |
| 170 | if ((nread = safe_read(fd, buf, sizeof(buf))) < 0) | 170 | if ((nread = safe_read(fd, buf, sizeof(buf))) < 0) |
| 171 | bb_perror_msg_and_die("read"); | 171 | bb_perror_msg_and_die(bb_msg_read_error); |
| 172 | 172 | ||
| 173 | if (fd == sfd) { | 173 | if (fd == sfd) { |
| 174 | if (nread == 0) | 174 | if (nread == 0) |
| @@ -181,7 +181,7 @@ int nc_main(int argc, char **argv) | |||
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | if (bb_full_write(ofd, buf, nread) < 0) | 183 | if (bb_full_write(ofd, buf, nread) < 0) |
| 184 | bb_perror_msg_and_die("write"); | 184 | bb_perror_msg_and_die(bb_msg_write_error); |
| 185 | if (delay > 0) { | 185 | if (delay > 0) { |
| 186 | sleep(delay); | 186 | sleep(delay); |
| 187 | } | 187 | } |
