diff options
author | Jim Meyering <jim@meyering.net> | 1994-07-30 16:34:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-07-30 16:34:17 +0000 |
commit | 32bd426778e4d37e233fe06ce66eb72b4a84c883 (patch) | |
tree | 81eae5822f0dba853b9116c074fb3a2a55ba8faa /src/touch.c | |
parent | a272d8b0c6e62937ef7b69e3ca750e34fd3e3152 (diff) | |
download | coreutils-32bd426778e4d37e233fe06ce66eb72b4a84c883.tar.xz |
.
Diffstat (limited to 'src/touch.c')
-rw-r--r-- | src/touch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/touch.c b/src/touch.c index 33fadc282..feadcc713 100644 --- a/src/touch.c +++ b/src/touch.c @@ -49,6 +49,7 @@ #include <sys/types.h> #include "system.h" #include "version.h" +#include "safe-stat.h" #ifndef STDC_HEADERS time_t mktime (); @@ -227,7 +228,7 @@ main (argc, argv) if (use_ref) { - if (stat (ref_file, &ref_stats)) + if (SAFE_STAT (ref_file, &ref_stats)) error (1, errno, "%s", ref_file); date_set++; } @@ -272,7 +273,7 @@ touch (file) struct stat sbuf; int fd; - if (stat (file, &sbuf)) + if (SAFE_STAT (file, &sbuf)) { if (errno != ENOENT) { |