summaryrefslogtreecommitdiffstats
path: root/source/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
commit7ed71b73ae745da099072eee36fc2700d1d91407 (patch)
tree9b0b7714443f6d105c7476324d5faa4aec5d90c4 /source/lib/time.c
parent8eb701d0d6483d0f5c6de3640b38f98128cd321c (diff)
downloadsamba-7ed71b73ae745da099072eee36fc2700d1d91407.tar.gz
samba-7ed71b73ae745da099072eee36fc2700d1d91407.tar.xz
samba-7ed71b73ae745da099072eee36fc2700d1d91407.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
Diffstat (limited to 'source/lib/time.c')
-rw-r--r--source/lib/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/time.c b/source/lib/time.c
index 0b6e6df9b07..efcda804c49 100644
--- a/source/lib/time.c
+++ b/source/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;