diff options
author | 2013-04-18 02:28:48 +0000 | |
---|---|---|
committer | 2013-04-18 02:28:48 +0000 | |
commit | a9fa58fd9a3c0b601fc02c57db9d05cdd46ba6a2 (patch) | |
tree | 1f700cc2f50cdc788320362facaa961a24aee925 | |
parent | make "sftp -q" do what it says on the sticker: hush everything but errors; (diff) | |
download | wireguard-openbsd-a9fa58fd9a3c0b601fc02c57db9d05cdd46ba6a2.tar.xz wireguard-openbsd-a9fa58fd9a3c0b601fc02c57db9d05cdd46ba6a2.zip |
struct timezone is so 1980
-rw-r--r-- | usr.bin/pr/pr.c | 9 | ||||
-rw-r--r-- | usr.sbin/wsmoused/wsmoused.c | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index 840c601dbc6..49cc573d3a1 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pr.c,v 1.30 2010/08/25 18:20:11 chl Exp $ */ +/* $OpenBSD: pr.c,v 1.31 2013/04/18 02:28:48 deraadt Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -1436,7 +1436,6 @@ nxtfile(int argc, char *argv[], char **fname, char *buf, int dt) { FILE *inf = NULL; struct timeval tv; - struct timezone tz; struct tm *timeptr = NULL; struct stat statbuf; time_t curtime; @@ -1457,7 +1456,7 @@ nxtfile(int argc, char *argv[], char **fname, char *buf, int dt) *fname = FNAME; if (nohead) return(inf); - if (gettimeofday(&tv, &tz) < 0) { + if (gettimeofday(&tv, NULL) < 0) { ++errcnt; ferrout("pr: cannot get time of day, %s\n", strerror(errno)); @@ -1481,7 +1480,7 @@ nxtfile(int argc, char *argv[], char **fname, char *buf, int dt) ++eoptind; if (nohead || (dt && twice)) return(inf); - if (gettimeofday(&tv, &tz) < 0) { + if (gettimeofday(&tv, NULL) < 0) { ++errcnt; ferrout("pr: cannot get time of day, %s\n", strerror(errno)); @@ -1512,7 +1511,7 @@ nxtfile(int argc, char *argv[], char **fname, char *buf, int dt) return(inf); if (dt) { - if (gettimeofday(&tv, &tz) < 0) { + if (gettimeofday(&tv, NULL) < 0) { ++errcnt; ferrout("pr: cannot get time of day, %s\n", strerror(errno)); diff --git a/usr.sbin/wsmoused/wsmoused.c b/usr.sbin/wsmoused/wsmoused.c index 47d68ba3bc4..92d8e66c010 100644 --- a/usr.sbin/wsmoused/wsmoused.c +++ b/usr.sbin/wsmoused/wsmoused.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmoused.c,v 1.27 2011/10/18 20:07:46 djm Exp $ */ +/* $OpenBSD: wsmoused.c,v 1.28 2013/04/18 02:29:59 deraadt Exp $ */ /* * Copyright (c) 2001 Jean-Baptiste Marchand, Julien Montagne and Jerome Verdon @@ -266,10 +266,9 @@ mouse_click(struct wscons_event *event) struct timeval max_date; struct timeval now; struct timeval delay; - struct timezone tz; int i = event->value; /* button number */ - gettimeofday(&now, &tz); + gettimeofday(&now, NULL); delay.tv_sec = mouse.clickthreshold / 1000; delay.tv_usec = (mouse.clickthreshold % 1000) * 1000; timersub(&now, &delay, &max_date); |