summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-10-10 05:03:53 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-10-10 05:03:53 +0000
commit8459ba6b8b3a50e104683befd90c267de81ffceb (patch)
tree129b3b419d671ddaecee0618fc9abebcd046c985
parent185a842375b4d5d4995f0a290b0d9b482eeedf8f (diff)
Use clock_gettime(CLOCK_REALTIME) instead of gettimeofday+TIMEVAL_TO_TIMESPEC
ok jung@
-rw-r--r--usr.sbin/smtpd/queue_fs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/queue_fs.c b/usr.sbin/smtpd/queue_fs.c
index 41e92c03091..516db0b7b86 100644
--- a/usr.sbin/smtpd/queue_fs.c
+++ b/usr.sbin/smtpd/queue_fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue_fs.c,v 1.14 2015/12/30 11:40:30 jung Exp $ */
+/* $OpenBSD: queue_fs.c,v 1.15 2017/10/10 05:03:52 guenther Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -729,7 +729,6 @@ queue_fs_init(struct passwd *pw, int server, const char *conf)
char *paths[] = { PATH_QUEUE, PATH_CORRUPT, PATH_INCOMING };
char path[PATH_MAX];
int ret;
- struct timeval tv;
/* remove incoming/ if it exists */
if (server)
@@ -746,9 +745,8 @@ queue_fs_init(struct passwd *pw, int server, const char *conf)
ret = 0;
}
- if (gettimeofday(&tv, NULL) == -1)
- err(1, "gettimeofday");
- TIMEVAL_TO_TIMESPEC(&tv, &startup);
+ if (clock_gettime(CLOCK_REALTIME, &startup))
+ err(1, "clock_gettime");
tree_init(&evpcount);