(list_entries_who): Don't output a trailing space.
authorJim Meyering <jim@meyering.net>
Sat, 12 Jun 2004 08:05:59 +0000 (08:05 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 12 Jun 2004 08:05:59 +0000 (08:05 +0000)
src/who.c

index 1336510f34232d3c115b5a34c7556871f0a2fd87..8c08162fe71246b63edf12a4a7c6c0cc163b6746 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -519,6 +519,7 @@ static void
 list_entries_who (int n, const STRUCT_UTMP *utmp_buf)
 {
   int entries = 0;
+  char const *separator = "";
 
   while (n--)
     {
@@ -528,8 +529,9 @@ list_entries_who (int n, const STRUCT_UTMP *utmp_buf)
 
          trimmed_name = extract_trimmed_name (utmp_buf);
 
-         printf ("%s ", trimmed_name);
+         printf ("%s%s", separator, trimmed_name);
          free (trimmed_name);
+         separator = " ";
          entries++;
        }
       utmp_buf++;