diff options
author | 2013-04-02 05:04:47 +0000 | |
---|---|---|
committer | 2013-04-02 05:04:47 +0000 | |
commit | cea4a14c7cd61419f43f7acf4ba09da6692f84ef (patch) | |
tree | 8f59754045030b63dcf78acfc1d795778ef96f65 | |
parent | kill useless cast (diff) | |
download | wireguard-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.c | 4 |
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; } |