diff options
Diffstat (limited to 'source3/lib/time.c')
-rw-r--r-- | source3/lib/time.c | 24 |
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; |