summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-04-02 05:04:47 +0000
committerderaadt <deraadt@openbsd.org>2013-04-02 05:04:47 +0000
commitcea4a14c7cd61419f43f7acf4ba09da6692f84ef (patch)
tree8f59754045030b63dcf78acfc1d795778ef96f65
parentkill useless cast (diff)
downloadwireguard-openbsd-cea4a14c7cd61419f43f7acf4ba09da6692f84ef.tar.xz
wireguard-openbsd-cea4a14c7cd61419f43f7acf4ba09da6692f84ef.zip
for parsing time values, fall back to atoll() for time_t
ok guenther
-rw-r--r--usr.sbin/user/user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c
index 419024021c9..0aba94b4b51 100644
--- a/usr.sbin/user/user.c
+++ b/usr.sbin/user/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.94 2013/03/04 07:24:52 ajacoutot Exp $ */
+/* $OpenBSD: user.c,v 1.95 2013/04/02 05:04:47 deraadt Exp $ */
/* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */
/*
@@ -923,7 +923,7 @@ scantime(time_t *tp, char *s)
} else if (strptime(s, "%B %d %Y", &tm) != NULL) {
*tp = mktime(&tm);
} else if (isdigit((unsigned char) s[0]) != 0) {
- *tp = atoi(s);
+ *tp = (time_t)atoll(s);
} else {
return 0;
}