summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/who.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 57dc2fa6c..956aab0e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/who.c (print_user): Rewrite to avoid warning from
+ GCC 4.1.1 with -Wall.
+
2006-09-12 Jim Meyering <jim@meyering.net>
* tests/mv/atomic: Check for specific strace output, rather than
diff --git a/src/who.c b/src/who.c
index 82921b0f5..211b08fb7 100644
--- a/src/who.c
+++ b/src/who.c
@@ -414,7 +414,7 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
hostlen = 1;
hoststr = xrealloc (hoststr, hostlen);
}
- stpcpy (hoststr, "");
+ *hoststr = '\0';
}
#endif