From: Paul Eggert Date: Tue, 12 Sep 2006 23:32:16 +0000 (+0000) Subject: (print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall. X-Git-Tag: v6.2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33f1b50fca9dc2767b81770ed1b31b88750113a7;p=thirdparty%2Fcoreutils.git (print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall. --- diff --git a/ChangeLog b/ChangeLog index 57dc2fa6c2..956aab0e1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-12 Paul Eggert + + * src/who.c (print_user): Rewrite to avoid warning from + GCC 4.1.1 with -Wall. + 2006-09-12 Jim Meyering * tests/mv/atomic: Check for specific strace output, rather than diff --git a/src/who.c b/src/who.c index 82921b0f59..211b08fb7c 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