From 4f54cdb1dd4b8929231f42e22b79a0d5c7600cba Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Jun 1996 21:01:27 +0000 Subject: * sysdeps/sparc/elf/start.S: New file. * sysdeps/sparc/dl-machine.h: New file. * posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr only for ?s, not for *s. Fix from Chet Ramey. Fixes thanks to Raja R Harinath : * sysdeps/unix/sysv/utmpbits.h: Define _HAVE_UT_{TYPE,ID,TV,HOST}. Use __{BEGIN,END}_DECLS. (_PATH_WTMP, _PATH_UTMP, _PATH_LASTLOG): New macros. * login/utmp.h (UTMP_FILE, UTMP_FILENAME, WTMP_FILE, WTMP_FILENAME): New macros, moved here from sysdeps/gnu/utmpbits.h. * sysdeps/generic/utmpbits.h (_HAVE_UT_HOST): Define it. * sysdeps/gnu/utmpbits.h (_HAVE_UT_HOST): Likewise. * login/logout.c: Use ut_host only #if _HAVE_UT_HOST. Use sizeof instead of UT_*SIZE. * login/logwtmp.c: Likewise. * misc/tsearch.c (tdelete): Define as weak alias to __tdelete. * version.c (banner): Add trailing newline. --- login/logout.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'login/logout.c') diff --git a/login/logout.c b/login/logout.c index d47a392..1b8dc31 100644 --- a/login/logout.c +++ b/login/logout.c @@ -41,15 +41,16 @@ logout (const char *line) #if _HAVE_UT_TYPE - 0 tmp.ut_type = USER_PROCESS; #endif - strncpy (tmp.ut_line, line, UT_LINESIZE); + strncpy (tmp.ut_line, line, sizeof tmp.ut_line); /* Read the record. */ if (getutline_r (&tmp, &ut, &data) >= 0 || errno == ESRCH) { /* Clear information about who & from where. */ - bzero (ut->ut_name, UT_NAMESIZE); - bzero (ut->ut_host, UT_HOSTSIZE); - + bzero (ut->ut_name, sizeof ut->ut_name); +#if _HAVE_UT_HOST - 0 + bzero (ut->ut_host, sizeof ut->ut_host); +#endif #if _HAVE_UT_TV - 0 gettimeofday (&ut->ut_tv, NULL); #else -- cgit v1.1