aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-10-26 12:56:41 -0500
committerRob Landley <rob@landley.net>2014-10-26 12:56:41 -0500
commitd3f335d2cf64eb6c556ee5ba6e4a9315766e3c6e (patch)
treef404ff7d819854a5c6107287da1f5c4e249dac56
parent90397b299974b76511892593e7ae14c99cbf144b (diff)
downloadtoybox-d3f335d2cf64eb6c556ee5ba6e4a9315766e3c6e.tar.gz
Cosmetic tweak: no trailing spaces when ./toybox lists command names.
-rw-r--r--main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/main.c b/main.c
index c3577b64..ed6706a9 100644
--- a/main.c
+++ b/main.c
@@ -166,11 +166,9 @@ list:
for (j=0; toy_paths[j]; j++)
if (fl & (1<<j)) len += printf("%s", toy_paths[j]);
}
- len += printf("%s ",toy_list[i].name);
- if (len>65) {
- xputc('\n');
- len=0;
- }
+ len += printf("%s",toy_list[i].name);
+ if (++len > 65) len = 0;
+ xputc(len ? ' ' : '\n');
}
}
xputc('\n');