summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-12 02:58:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:03 -0500
commitb86d6b75c02576eae7c19c9018273a176b1c376a (patch)
treeaaadaa5c1e6bc83a80be6b79c48a1e6f0d30707d /source3
parentec4384913415a64f9b95fa679692800d2dc6afd4 (diff)
downloadsamba-b86d6b75c02576eae7c19c9018273a176b1c376a.tar.gz
samba-b86d6b75c02576eae7c19c9018273a176b1c376a.tar.bz2
samba-b86d6b75c02576eae7c19c9018273a176b1c376a.zip
r20695: Remove duplication of constants.
Jeremy. (This used to be commit 66cca893e1aa035fa0aa05c0d542848f084fac31)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/time.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index e211bda3fb..f45a8d3e84 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -56,8 +56,6 @@ void GetTimeOfDay(struct timeval *tval)
#endif
}
-#define TIME_FIXUP_CONSTANT 11644473600LL
-
struct timespec convert_time_t_to_timespec(time_t t)
{
struct timespec ts;
@@ -107,7 +105,7 @@ void unix_to_nt_time(NTTIME *nt, time_t t)
}
t2 = t;
- t2 += TIME_FIXUP_CONSTANT;
+ t2 += TIME_FIXUP_CONSTANT_INT;
t2 *= 1000*1000*10;
*nt = t2;
@@ -545,7 +543,7 @@ struct timeval timeval_until(const struct timeval *tv1,
NTTIME timeval_to_nttime(const struct timeval *tv)
{
return 10*(tv->tv_usec +
- ((TIME_FIXUP_CONSTANT + (uint64_t)tv->tv_sec) * 1000000));
+ ((TIME_FIXUP_CONSTANT_INT + (uint64_t)tv->tv_sec) * 1000000));
}
/*******************************************************************
@@ -1075,13 +1073,6 @@ time_t cli_make_unix_date3(struct cli_state *cli, void *date_ptr)
return make_unix_date3(date_ptr, cli->serverzone);
}
-#if (SIZEOF_LONG == 8)
-#define TIME_FIXUP_CONSTANT_INT 11644473600L
-#elif (SIZEOF_LONG_LONG == 8)
-#define TIME_FIXUP_CONSTANT_INT 11644473600LL
-#endif
-
-
/* Large integer version. */
struct timespec nt_time_to_unix_timespec(NTTIME *nt)
{