Skip to content

Commit

Permalink
timestamp.c: remove warning for normal case
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncaen committed Feb 3, 2020
1 parent 31d95b9 commit 50a47d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ timestamp_check(int fd, int secs)
if (st.st_uid != 0 || st.st_gid != getgid() || st.st_mode != (S_IFREG | 0000))
errx(1, "timestamp uid, gid or mode wrong");

if (!timespecisset(&st.st_atim) || !timespecisset(&st.st_mtim)) {
warnx("timestamp atim or mtime not set");
/* this timestamp was created but never set, invalid but no error */
if (!timespecisset(&st.st_atim) || !timespecisset(&st.st_mtim))
return 0;
}

if (clock_gettime(CLOCK_BOOTTIME, &ts[0]) == -1 ||
clock_gettime(CLOCK_REALTIME, &ts[1]) == -1) {
Expand Down

0 comments on commit 50a47d3

Please sign in to comment.