changeset 1533:3c77af6f81cc

Cosmetic tweak: no trailing spaces when ./toybox lists command names.
author Rob Landley <rob@landley.net>
date Sun, 26 Oct 2014 12:56:41 -0500
parents bf2c5216d726
children 83cac28515a3
files main.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Fri Oct 24 18:16:32 2014 -0500
+++ b/main.c	Sun Oct 26 12:56:41 2014 -0500
@@ -166,11 +166,9 @@
         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');