svn commit: trunk/busybox/networking

aldot at busybox.net aldot at busybox.net
Mon Apr 3 12:29:13 UTC 2006


Author: aldot
Date: 2006-04-03 05:29:12 -0700 (Mon, 03 Apr 2006)
New Revision: 14737

Log:
- coalesce printf calls.
   text    data     bss     dec     hex filename
   3474       4      96    3574     df6 networking/arping.o.orig
   3424       4      96    3524     dc4 networking/arping.o


Modified:
   trunk/busybox/networking/arping.c


Changeset:
Modified: trunk/busybox/networking/arping.c
===================================================================
--- trunk/busybox/networking/arping.c	2006-04-03 11:52:01 UTC (rev 14736)
+++ trunk/busybox/networking/arping.c	2006-04-03 12:29:12 UTC (rev 14737)
@@ -112,8 +112,10 @@
 static void finish(void)
 {
 	if (!(cfg&quiet)) {
-		printf("Sent %d probes (%d broadcast(s))\n", sent, brd_sent);
-		printf("Received %d repl%s", received, (received > 1) ? "ies" : "y");
+		printf("Sent %d probes (%d broadcast(s))\n"
+			"Received %d repl%s",
+			sent, brd_sent,
+			received, (received > 1) ? "ies" : "y");
 		if (brd_recv || req_recv) {
 			printf(" (");
 			if (req_recv)
@@ -221,12 +223,11 @@
 
 		gettimeofday(&tv, NULL);
 
-		printf("%s ",
-			   FROM->sll_pkttype == PACKET_HOST ? "Unicast" : "Broadcast");
-		printf("%s from ",
-			   ah->ar_op == htons(ARPOP_REPLY) ? "reply" : "request");
-		printf("%s ", inet_ntoa(src_ip));
-		printf("[%s]", ether_ntoa((struct ether_addr *) p));
+		printf("%s %s from %s [%s]",
+			FROM->sll_pkttype == PACKET_HOST ? "Unicast" : "Broadcast",
+			ah->ar_op == htons(ARPOP_REPLY) ? "reply" : "request",
+			inet_ntoa(src_ip),
+			ether_ntoa((struct ether_addr *) p));
 		if (dst_ip.s_addr != src.s_addr) {
 			printf("for %s ", inet_ntoa(dst_ip));
 			s_printed = 1;
@@ -421,9 +422,9 @@
 	memset(he.sll_addr, -1, he.sll_halen);
 
 	if (!(cfg&quiet)) {
-		printf("ARPING to %s", inet_ntoa(dst));
-		printf(" from %s via %s\n", inet_ntoa(src),
-			   device ? device : "unknown");
+		printf("ARPING to %s from %s via %s\n",
+			inet_ntoa(dst), inet_ntoa(src),
+			device ? device : "unknown");
 	}
 
 	if (!src.s_addr && !(cfg&dad)) {




More information about the busybox-cvs mailing list