aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-07 06:33:01 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-07 06:33:01 +0000
commit26d53eb197c6c47c323c3772bfdbfe7f3906e881 (patch)
tree26aafb451367731c62e89a47fc1b248732d16f3c
parentec9fad9a4997bbabaebad3c29a3c9f1ef2068788 (diff)
downloadbusybox-w32-26d53eb197c6c47c323c3772bfdbfe7f3906e881.tar.gz
busybox-w32-26d53eb197c6c47c323c3772bfdbfe7f3906e881.tar.bz2
busybox-w32-26d53eb197c6c47c323c3772bfdbfe7f3906e881.zip
This patch by Vladimir and Larry saves a few bytes.
-rw-r--r--networking/route.c9
-rw-r--r--route.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/networking/route.c b/networking/route.c
index 9be002792..b1152ca9d 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -15,11 +15,10 @@
15 * Foundation; either version 2 of the License, or (at 15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version. 16 * your option) any later version.
17 * 17 *
18 * $Id: route.c,v 1.7 2001/02/20 06:14:08 andersen Exp $ 18 * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $
19 * 19 *
20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> 20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
21 * busybox style adjustments by Larry Doolittle <LRDoolittle@lbl.gov> 21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
22 * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173.
23 */ 22 */
24 23
25#include <sys/types.h> 24#include <sys/types.h>
@@ -394,7 +393,7 @@ void displayroutes(void)
394 inet_ntoa(dest))); 393 inet_ntoa(dest)));
395 strcpy(sgw, (gw.s_addr==0 ? "*" : 394 strcpy(sgw, (gw.s_addr==0 ? "*" :
396 inet_ntoa(gw))); 395 inet_ntoa(gw)));
397 printf("%-15s %-15s %-15s %-5s %-6d %-2d %7d %s\n", 396 printf("%-16s%-16s%-16s%-6s%-6d %-2d %7d %s\n",
398 sdest, sgw, 397 sdest, sgw,
399 inet_ntoa(mask), 398 inet_ntoa(mask),
400 flags, metric, ref, use, buff); 399 flags, metric, ref, use, buff);
@@ -412,7 +411,7 @@ int route_main(int argc, char **argv)
412 411
413 if (*argv == NULL) { 412 if (*argv == NULL) {
414 displayroutes(); 413 displayroutes();
415 exit(EXIT_SUCCESS); 414 return EXIT_SUCCESS;
416 } else { 415 } else {
417 /* check verb */ 416 /* check verb */
418 if (strcmp(*argv, "add")==0) 417 if (strcmp(*argv, "add")==0)
diff --git a/route.c b/route.c
index 9be002792..b1152ca9d 100644
--- a/route.c
+++ b/route.c
@@ -15,11 +15,10 @@
15 * Foundation; either version 2 of the License, or (at 15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version. 16 * your option) any later version.
17 * 17 *
18 * $Id: route.c,v 1.7 2001/02/20 06:14:08 andersen Exp $ 18 * $Id: route.c,v 1.8 2001/03/07 06:33:01 andersen Exp $
19 * 19 *
20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> 20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
21 * busybox style adjustments by Larry Doolittle <LRDoolittle@lbl.gov> 21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
22 * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173.
23 */ 22 */
24 23
25#include <sys/types.h> 24#include <sys/types.h>
@@ -394,7 +393,7 @@ void displayroutes(void)
394 inet_ntoa(dest))); 393 inet_ntoa(dest)));
395 strcpy(sgw, (gw.s_addr==0 ? "*" : 394 strcpy(sgw, (gw.s_addr==0 ? "*" :
396 inet_ntoa(gw))); 395 inet_ntoa(gw)));
397 printf("%-15s %-15s %-15s %-5s %-6d %-2d %7d %s\n", 396 printf("%-16s%-16s%-16s%-6s%-6d %-2d %7d %s\n",
398 sdest, sgw, 397 sdest, sgw,
399 inet_ntoa(mask), 398 inet_ntoa(mask),
400 flags, metric, ref, use, buff); 399 flags, metric, ref, use, buff);
@@ -412,7 +411,7 @@ int route_main(int argc, char **argv)
412 411
413 if (*argv == NULL) { 412 if (*argv == NULL) {
414 displayroutes(); 413 displayroutes();
415 exit(EXIT_SUCCESS); 414 return EXIT_SUCCESS;
416 } else { 415 } else {
417 /* check verb */ 416 /* check verb */
418 if (strcmp(*argv, "add")==0) 417 if (strcmp(*argv, "add")==0)