Ignore ts_write() return value when disabling an entry with a bogus

timestamp.  We ignore the timestamp entry even it doesn't succeed.
Coverity CID 104062.
This commit is contained in:
Todd C. Miller
2016-05-05 16:30:11 -06:00
parent 6473d55aa7
commit 60e740dd60

View File

@@ -756,7 +756,7 @@ timestamp_status(void *vcookie, struct passwd *pw)
N_("ignoring time stamp from the future"));
status = TS_OLD;
SET(entry.flags, TS_DISABLED);
ts_write(cookie->fd, cookie->fname, &entry, cookie->pos);
(void)ts_write(cookie->fd, cookie->fname, &entry, cookie->pos);
}
#else
/* Check for bogus (future) time in the stampfile. */
@@ -769,7 +769,7 @@ timestamp_status(void *vcookie, struct passwd *pw)
4 + ctime(&tv_sec));
status = TS_OLD;
SET(entry.flags, TS_DISABLED);
ts_write(cookie->fd, cookie->fname, &entry, cookie->pos);
(void)ts_write(cookie->fd, cookie->fname, &entry, cookie->pos);
}
#endif /* CLOCK_MONOTONIC */
} else {