usage: do not print trailing space for commands which have no arguments

function                                             old     new   delta
bb_show_usage                                        120     130     +10

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-07-09 18:23:33 +02:00
parent cbe8c65e59
commit 253f555f01

View File

@ -169,8 +169,11 @@ void FAST_FUNC bb_show_usage(void)
else {
full_write2_str("\nUsage: ");
full_write2_str(applet_name);
if (p[0]) {
if (p[0] != '\n')
full_write2_str(" ");
full_write2_str(p);
}
full_write2_str("\n");
}
if (ENABLE_FEATURE_CLEAN_UP)