From 0ee3999d13b662d233dfc7decdd4d691cd66fdda Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 24 Dec 2006 15:23:28 +0000 Subject: random tiny size savings --- shell/ash.c | 16 +++++----------- shell/msh.c | 8 +++----- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 2de61dad9..e8f7d30bd 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11893,17 +11893,11 @@ static int helpcmd(int argc, char **argv) } } #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL - { - extern const struct BB_applet applets[]; - extern const size_t NUM_APPLETS; - - for (i = 0; i < NUM_APPLETS; i++) { - - col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), applets[i].name); - if (col > 60) { - out1fmt("\n"); - col = 0; - } + for (i = 0; i < NUM_APPLETS; i++) { + col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), applets[i].name); + if (col > 60) { + out1fmt("\n"); + col = 0; } } #endif diff --git a/shell/msh.c b/shell/msh.c index 45ca3df81..d4f534551 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -3243,8 +3243,8 @@ static int dohelp(struct op *t) int col; const struct builtincmd *x; - printf("\nBuilt-in commands:\n"); - printf("-------------------\n"); + puts("\nBuilt-in commands:\n" + "-------------------"); for (col = 0, x = builtincmds; x->builtinfunc != NULL; x++) { if (!x->name) @@ -3259,8 +3259,6 @@ static int dohelp(struct op *t) { int i; const struct BB_applet *applet; - extern const struct BB_applet applets[]; - extern const size_t NUM_APPLETS; for (i = 0, applet = applets; i < NUM_APPLETS; applet++, i++) { if (!applet->name) @@ -3274,7 +3272,7 @@ static int dohelp(struct op *t) } } #endif - printf("\n\n"); + puts("\n"); return EXIT_SUCCESS; } -- cgit v1.2.3