From 90b708473887ac11ca81f5a056ae5d2c854cf616 Mon Sep 17 00:00:00 2001 From: Matthew Chapman Date: Mon, 1 Feb 1999 02:36:24 +0000 Subject: Added init_nt_time function which initialises an NTTIME to -1. (This used to be commit e1e3875057bed830fdc0aaa9c85f04a1479fd64a) --- source3/lib/time.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source3/lib/time.c') diff --git a/source3/lib/time.c b/source3/lib/time.c index 3cea1a3e14..85f6006389 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -298,13 +298,6 @@ void unix_to_nt_time(NTTIME *nt, time_t t) { double d; - if (t==0) - { - nt->low = 0; - nt->high = 0; - return; - } - /* this converts GMT to kludge-GMT */ t -= LocTimeDiff(t) - serverzone; @@ -316,6 +309,15 @@ void unix_to_nt_time(NTTIME *nt, time_t t) nt->low = (uint32)(d - ((double)nt->high)*4.0*(double)(1<<30)); } +/**************************************************************************** +initialise an NTTIME to -1, which means "unknown" or "don't expire" +****************************************************************************/ + +void init_nt_time(NTTIME *nt) +{ + nt->high = 0x7FFFFFFF; + nt->low = 0xFFFFFFFF; +} /**************************************************************************** take an NTTIME structure, containing high / low time. convert to unix time. -- cgit