projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbe8c65
)
usage: do not print trailing space for commands which have no arguments
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 9 Jul 2018 16:23:33 +0000
(18:23 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 9 Jul 2018 16:23:33 +0000
(18:23 +0200)
function old new delta
bb_show_usage 120 130 +10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/appletlib.c
patch
|
blob
|
history
diff --git
a/libbb/appletlib.c
b/libbb/appletlib.c
index 769b7881ce403749bfc88165caa419eadf0dcd67..f155d09081132c593188cce2563890fcc124e1e7 100644
(file)
--- a/
libbb/appletlib.c
+++ b/
libbb/appletlib.c
@@
-169,8
+169,11
@@
void FAST_FUNC bb_show_usage(void)
else {
full_write2_str("\nUsage: ");
full_write2_str(applet_name);
- full_write2_str(" ");
- full_write2_str(p);
+ if (p[0]) {
+ if (p[0] != '\n')
+ full_write2_str(" ");
+ full_write2_str(p);
+ }
full_write2_str("\n");
}
if (ENABLE_FEATURE_CLEAN_UP)