summaryrefslogtreecommitdiff
path: root/src/who.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-12 08:05:59 +0000
committerJim Meyering <jim@meyering.net>2004-06-12 08:05:59 +0000
commit69cf3d4811b38e87a7f806a06688824a8440f1e8 (patch)
tree5d945758fdfb01ff2dab29d1fd5816107fe8e9fe /src/who.c
parent7b4fe61887a7f087466e3e7e05f1177d1c524e4d (diff)
downloadcoreutils-69cf3d4811b38e87a7f806a06688824a8440f1e8.tar.xz
(list_entries_who): Don't output a trailing space.
Diffstat (limited to 'src/who.c')
-rw-r--r--src/who.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/who.c b/src/who.c
index 1336510f3..8c08162fe 100644
--- 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++;