summaryrefslogtreecommitdiff
path: root/source3/lib/time.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-06-06 11:43:09 +0000
committerAndrew Tridgell <tridge@samba.org>1996-06-06 11:43:09 +0000
commitb9ae225b28f4707609e6436dad4be7ebdd7e181f (patch)
treede9b672d8fd9cbb0e79039f7ea543b4c4793a2d1 /source3/lib/time.c
parentf57b053db8b17041ef02588127a67f362af871b6 (diff)
downloadsamba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.tar.gz
samba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.tar.bz2
samba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.zip
- added interface.c and removed all the references to myip, bcast_ip
and Netmask, instead replacing them with calls to routines in interface.c - got rid of old MAXINT define - added code to ensure we only return one entry for each name in the ipc enum routines - added new_only option to add_netbios_entry() to prevent overwriting of important names - minor time handling fixup (This used to be commit 7ed71b73ae745da099072eee36fc2700d1d91407)
Diffstat (limited to 'source3/lib/time.c')
-rw-r--r--source3/lib/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 0b6e6df9b0..efcda804c4 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -142,6 +142,10 @@ static int TimeZoneFaster(time_t t)
if (t < low)
low = TIME_T_MIN;
+ high = t + MAX_DST_WIDTH/2;
+ if (high < t)
+ high = TIME_T_MAX;
+
/* widen the new entry using two bisection searches */
while (low+60*60 < dst_table[i].start) {
if (dst_table[i].start - low > MAX_DST_SKIP*2)
@@ -154,10 +158,6 @@ static int TimeZoneFaster(time_t t)
low = t;
}
- high = low + MAX_DST_WIDTH/2;
- if (high < t)
- high = TIME_T_MAX;
-
while (high-60*60 > dst_table[i].end) {
if (high - dst_table[i].end > MAX_DST_SKIP*2)
t = dst_table[i].end + MAX_DST_SKIP;