use shared busybox error messages to save a few bytes
This commit is contained in:
parent
7dc7f402a7
commit
9c85ecdef4
@ -96,7 +96,7 @@ int nc_main(int argc, char **argv)
|
||||
bb_perror_msg_and_die("socket");
|
||||
x = 1;
|
||||
if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)) == -1)
|
||||
bb_perror_msg_and_die ("reuseaddr failed");
|
||||
bb_perror_msg_and_die("reuseaddr");
|
||||
address.sin_family = AF_INET;
|
||||
|
||||
if (wsecs) {
|
||||
@ -168,7 +168,7 @@ int nc_main(int argc, char **argv)
|
||||
for (fd = 0; fd < FD_SETSIZE; fd++) {
|
||||
if (FD_ISSET(fd, &testfds)) {
|
||||
if ((nread = safe_read(fd, buf, sizeof(buf))) < 0)
|
||||
bb_perror_msg_and_die("read");
|
||||
bb_perror_msg_and_die(bb_msg_read_error);
|
||||
|
||||
if (fd == sfd) {
|
||||
if (nread == 0)
|
||||
@ -181,7 +181,7 @@ int nc_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (bb_full_write(ofd, buf, nread) < 0)
|
||||
bb_perror_msg_and_die("write");
|
||||
bb_perror_msg_and_die(bb_msg_write_error);
|
||||
if (delay > 0) {
|
||||
sleep(delay);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user