summaryrefslogtreecommitdiff
path: root/source3/lib/time.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
committerJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
commit30191d1a5704ad2b158386b511558972d539ce47 (patch)
tree4f46e5c4f28f672ab661aa18f45745860970a88c /source3/lib/time.c
parent789856f63ff73fec66298e95c91c60db7bdaf14e (diff)
downloadsamba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz
samba-30191d1a5704ad2b158386b511558972d539ce47.tar.bz2
samba-30191d1a5704ad2b158386b511558972d539ce47.zip
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/lib/time.c')
-rw-r--r--source3/lib/time.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 35d10186be..e29308fcd0 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -117,7 +117,7 @@ void unix_to_nt_time(NTTIME *nt, time_t t)
Check if it's a null unix time.
****************************************************************************/
-BOOL null_time(time_t t)
+bool null_time(time_t t)
{
return t == 0 ||
t == (time_t)0xFFFFFFFF ||
@@ -128,7 +128,7 @@ BOOL null_time(time_t t)
Check if it's a null NTTIME.
****************************************************************************/
-BOOL null_nttime(NTTIME t)
+bool null_nttime(NTTIME t)
{
return t == 0 || t == (NTTIME)-1;
}
@@ -137,7 +137,7 @@ BOOL null_nttime(NTTIME t)
Check if it's a null timespec.
****************************************************************************/
-BOOL null_timespec(struct timespec ts)
+bool null_timespec(struct timespec ts)
{
return ts.tv_sec == 0 ||
ts.tv_sec == (time_t)0xFFFFFFFF ||
@@ -401,7 +401,7 @@ struct timeval timeval_zero(void)
/**
return True if a timeval is zero
*/
-BOOL timeval_is_zero(const struct timeval *tv)
+bool timeval_is_zero(const struct timeval *tv)
{
return tv->tv_sec == 0 && tv->tv_usec == 0;
}
@@ -479,7 +479,7 @@ int timeval_compare(const struct timeval *tv1, const struct timeval *tv2)
/**
return True if a timer is in the past
*/
-BOOL timeval_expired(const struct timeval *tv)
+bool timeval_expired(const struct timeval *tv)
{
struct timeval tv2 = timeval_current();
if (tv2.tv_sec > tv->tv_sec) return True;
@@ -634,7 +634,7 @@ int get_time_zone(time_t t)
Check if NTTIME is 0.
****************************************************************************/
-BOOL nt_time_is_zero(const NTTIME *nt)
+bool nt_time_is_zero(const NTTIME *nt)
{
return (*nt == 0);
}
@@ -687,7 +687,7 @@ int set_server_zone_offset(time_t t)
Return the date and time as a string
****************************************************************************/
-char *current_timestring(BOOL hires)
+char *current_timestring(bool hires)
{
fstring TimeBuf;
struct timeval tp;
@@ -826,7 +826,7 @@ void put_long_date(char *p, time_t t)
structure.
****************************************************************************/
-time_t get_create_time(const SMB_STRUCT_STAT *st,BOOL fake_dirs)
+time_t get_create_time(const SMB_STRUCT_STAT *st,bool fake_dirs)
{
time_t ret, ret1;
@@ -848,7 +848,7 @@ time_t get_create_time(const SMB_STRUCT_STAT *st,BOOL fake_dirs)
return ret;
}
-struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,BOOL fake_dirs)
+struct timespec get_create_timespec(const SMB_STRUCT_STAT *st,bool fake_dirs)
{
struct timespec ts;
ts.tv_sec = get_create_time(st, fake_dirs);
@@ -1239,7 +1239,7 @@ struct timespec nt_time_to_unix_timespec(NTTIME *nt)
Check if two NTTIMEs are the same.
****************************************************************************/
-BOOL nt_time_equals(const NTTIME *nt1, const NTTIME *nt2)
+bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2)
{
return (*nt1 == *nt2);
}
@@ -1393,7 +1393,7 @@ void unix_to_nt_time_abs(NTTIME *nt, time_t t)
Check if it's a null mtime.
****************************************************************************/
-BOOL null_mtime(time_t mtime)
+bool null_mtime(time_t mtime)
{
if (mtime == 0 || mtime == (time_t)0xFFFFFFFF || mtime == (time_t)-1)
return(True);
@@ -1454,7 +1454,7 @@ const char *display_time(NTTIME nttime)
"%u seconds", days, hours, mins, secs);
}
-BOOL nt_time_is_set(const NTTIME *nt)
+bool nt_time_is_set(const NTTIME *nt)
{
if (*nt == 0x7FFFFFFFFFFFFFFFLL) {
return False;