diff options
| author | Rob Landley <rob@landley.net> | 2014-10-26 12:56:41 -0500 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2014-10-26 12:56:41 -0500 |
| commit | d3f335d2cf64eb6c556ee5ba6e4a9315766e3c6e (patch) | |
| tree | f404ff7d819854a5c6107287da1f5c4e249dac56 | |
| parent | 90397b299974b76511892593e7ae14c99cbf144b (diff) | |
| download | toybox-d3f335d2cf64eb6c556ee5ba6e4a9315766e3c6e.tar.gz | |
Cosmetic tweak: no trailing spaces when ./toybox lists command names.
| -rw-r--r-- | main.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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'); |
