[BusyBox-cvs] svn commit: trunk/busybox/networking

vapier at busybox.net vapier at busybox.net
Sat May 7 06:45:30 UTC 2005


Author: vapier
Date: 2005-05-07 00:45:29 -0600 (Sat, 07 May 2005)
New Revision: 10258

Log:
use shared busybox error messages to save a few bytes

Modified:
   trunk/busybox/networking/nc.c


Changeset:
Modified: trunk/busybox/networking/nc.c
===================================================================
--- trunk/busybox/networking/nc.c	2005-05-07 02:04:55 UTC (rev 10257)
+++ trunk/busybox/networking/nc.c	2005-05-07 06:45:29 UTC (rev 10258)
@@ -85,7 +85,7 @@
 #ifdef CONFIG_NC_GAPING_SECURITY_HOLE
 	if (pr00gie) {
 		/* won't need stdin */
-		close (STDIN_FILENO);      
+		close(STDIN_FILENO);      
 	}
 #endif /* CONFIG_NC_GAPING_SECURITY_HOLE */
 
@@ -95,8 +95,8 @@
 	if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
 		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");
+	if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)) == -1)
+		bb_perror_msg_and_die("reuseaddr");
 	address.sin_family = AF_INET;
 
 	if (wsecs) {
@@ -168,7 +168,7 @@
 		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 @@
 				}
 
 				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);
 				}




More information about the busybox-cvs mailing list