From: Jim Meyering Date: Fri, 22 Jul 1994 17:19:23 +0000 (+0000) Subject: * who.c (print_entry): Use SAFE_STAT. X-Git-Tag: textutils-1_12_1~653 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc0bbac46388dbd8f0cdb19ce0be7c7e4d5f2f97;p=thirdparty%2Fcoreutils.git * who.c (print_entry): Use SAFE_STAT. --- diff --git a/src/who.c b/src/who.c index d28d3733ab..5ded20f753 100644 --- a/src/who.c +++ b/src/who.c @@ -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;