summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-05-07 19:21:10 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-05-08 06:41:43 +0200
commit470cfb34aea693cdb774b648d51ceccda130f329 (patch)
tree70b3c6d3001bcdd66a2c46d3fd5e4b1650bcba93 /lib/util
parent0678eb6cdfa19f27de8093eee2a15b7493bbce67 (diff)
downloadsamba-470cfb34aea693cdb774b648d51ceccda130f329.tar.gz
lib/util: Map 0x7fffffffffffffffLL as 0x7fffffffffffffffLL in time conversion
TIME_T_MAX is not actually INT64_MAX at the moment, so check both values and set to the magic end-of-time value. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue May 8 06:41:43 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/time.c b/lib/util/time.c
index dc3ca68a3d..d5a429af94 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -148,7 +148,7 @@ _PUBLIC_ void unix_to_nt_time(NTTIME *nt, time_t t)
return;
}
- if (t == TIME_T_MAX) {
+ if (t == TIME_T_MAX || t == INT64_MAX) {
*nt = 0x7fffffffffffffffLL;
return;
}