mirror of
git://git.sv.gnu.org/coreutils
synced 2026-06-05 07:12:30 -04:00
* who.c (print_entry): Use SAFE_STAT.
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "version.h"
|
||||
#include "safe-stat.h"
|
||||
|
||||
#if !defined (UTMP_FILE) && defined (_PATH_UTMP) /* 4.4BSD. */
|
||||
#define UTMP_FILE _PATH_UTMP
|
||||
@@ -341,7 +342,7 @@ print_entry (this)
|
||||
line[DEV_DIR_LEN + sizeof (this->ut_line)] = '\0';
|
||||
}
|
||||
|
||||
if (stat (line, &stats) == 0)
|
||||
if (SAFE_STAT (line, &stats) == 0)
|
||||
{
|
||||
mesg = (stats.st_mode & S_IWGRP) ? '+' : '-';
|
||||
last_change = stats.st_atime;
|
||||
|
||||
Reference in New Issue
Block a user