summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed_atom.c4
-rw-r--r--sfeed_curses.c3
-rw-r--r--sfeed_frames.c4
-rw-r--r--sfeed_gopher.c4
-rw-r--r--sfeed_html.c4
-rw-r--r--sfeed_mbox.c4
-rw-r--r--sfeed_plain.c4
7 files changed, 14 insertions, 13 deletions
diff --git a/sfeed_atom.c b/sfeed_atom.c
index 1dff75b..2aea54e 100644
--- a/sfeed_atom.c
+++ b/sfeed_atom.c
@@ -124,8 +124,8 @@ main(int argc, char *argv[])
if (pledge(argc == 1 ? "stdio" : "stdio rpath", NULL) == -1)
err(1, "pledge");
- if ((now = time(NULL)) == -1)
- err(1, "time");
+ if ((now = time(NULL)) == (time_t)-1)
+ errx(1, "time");
if (!(tm = gmtime_r(&now, &tmnow)))
err(1, "gmtime_r");
diff --git a/sfeed_curses.c b/sfeed_curses.c
index 4d77504..1c6bc24 100644
--- a/sfeed_curses.c
+++ b/sfeed_curses.c
@@ -1308,7 +1308,8 @@ feeds_load(struct feed *feeds, size_t nfeeds)
struct feed *f;
size_t i;
- if ((comparetime = time(NULL)) == -1)
+ errno = 0;
+ if ((comparetime = time(NULL)) == (time_t)-1)
die("time");
/* 1 day is old news */
comparetime -= 86400;
diff --git a/sfeed_frames.c b/sfeed_frames.c
index 89838cc..d345c60 100644
--- a/sfeed_frames.c
+++ b/sfeed_frames.c
@@ -86,8 +86,8 @@ main(int argc, char *argv[])
if (!(feeds = calloc(argc, sizeof(struct feed))))
err(1, "calloc");
- if ((comparetime = time(NULL)) == -1)
- err(1, "time");
+ if ((comparetime = time(NULL)) == (time_t)-1)
+ errx(1, "time");
/* 1 day is old news */
comparetime -= 86400;
diff --git a/sfeed_gopher.c b/sfeed_gopher.c
index 9e8e10a..0b95b3d 100644
--- a/sfeed_gopher.c
+++ b/sfeed_gopher.c
@@ -137,8 +137,8 @@ main(int argc, char *argv[])
err(1, "pledge");
}
- if ((comparetime = time(NULL)) == -1)
- err(1, "time");
+ if ((comparetime = time(NULL)) == (time_t)-1)
+ errx(1, "time");
/* 1 day is old news */
comparetime -= 86400;
diff --git a/sfeed_html.c b/sfeed_html.c
index d8abda7..240ea66 100644
--- a/sfeed_html.c
+++ b/sfeed_html.c
@@ -86,8 +86,8 @@ main(int argc, char *argv[])
if (!(feeds = calloc(argc, sizeof(struct feed))))
err(1, "calloc");
- if ((comparetime = time(NULL)) == -1)
- err(1, "time");
+ if ((comparetime = time(NULL)) == (time_t)-1)
+ errx(1, "time");
/* 1 day is old news */
comparetime -= 86400;
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index 6419d16..c2827d4 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -152,8 +152,8 @@ main(int argc, char *argv[])
user = "you";
if (gethostname(host, sizeof(host)) == -1)
err(1, "gethostname");
- if ((now = time(NULL)) == -1)
- err(1, "time");
+ if ((now = time(NULL)) == (time_t)-1)
+ errx(1, "time");
if (!gmtime_r(&now, &tmnow))
err(1, "gmtime_r: can't get current time");
if (!strftime(mtimebuf, sizeof(mtimebuf), "%a %b %d %H:%M:%S %Y", &tmnow))
diff --git a/sfeed_plain.c b/sfeed_plain.c
index df93a5a..45785e7 100644
--- a/sfeed_plain.c
+++ b/sfeed_plain.c
@@ -62,8 +62,8 @@ main(int argc, char *argv[])
if (pledge(argc == 1 ? "stdio" : "stdio rpath", NULL) == -1)
err(1, "pledge");
- if ((comparetime = time(NULL)) == -1)
- err(1, "time");
+ if ((comparetime = time(NULL)) == (time_t)-1)
+ errx(1, "time");
/* 1 day is old news */
comparetime -= 86400;