commit 12a65a4514d03ab4c597cd6557558981c36a0d15
parent bd6425ea89b3da5f3f9da693110db6e891b3c474
Author: Svyatoslav Mishyn <juef@openmailbox.org>
Date: Mon, 23 Oct 2017 23:42:23 +0300
date: don't use argument for time(2) as a call can fail
see BUGS section: http://man7.org/linux/man-pages/man2/time.2.html#BUGS
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/date.c b/date.c
@@ -9,7 +9,7 @@ dateread(void *arg, char *buf, size_t len)
struct tm *now;
time_t t;
- time(&t);
+ t = time(NULL);
now = localtime(&t);
if (now == NULL)
return -1;