summaryrefslogtreecommitdiff
path: root/sfeed_plain.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-07-30 16:09:54 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-07-30 16:09:54 +0200
commit6bb38b0df57c58c2f8088d990a28f2b2a8a87196 (patch)
tree6681822b6c14b6f1de8319da56ed9142f888de7a /sfeed_plain.c
parenta06b706edd825e766b732b8b7b83bc9dcc0d4215 (diff)
check for time() failure
Diffstat (limited to 'sfeed_plain.c')
-rw-r--r--sfeed_plain.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfeed_plain.c b/sfeed_plain.c
index f3ffcf7..4942d92 100644
--- a/sfeed_plain.c
+++ b/sfeed_plain.c
@@ -40,8 +40,10 @@ main(int argc, char *argv[])
char *name;
int i;
+ if ((comparetime = time(NULL)) == -1)
+ err(1, "time");
/* 1 day is old news */
- comparetime = time(NULL) - (3600 * 24);
+ comparetime -= 86400;
if (argc == 1) {
printfeed(stdin, "");