diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-27 17:21:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:53 -0500 |
commit | 4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a (patch) | |
tree | b2465bb451c73232e640d2c2718a6af084be2345 /source4/lib/util/time.c | |
parent | 8a1d019f53ef6d1a6900a005b335bdc10d14bbe4 (diff) | |
download | samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.gz samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.bz2 samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.zip |
r24710: Use standard boolean type for easier use by external users.
(This used to be commit 99f4124137d4a61216e8189f26d4da32882c0f4a)
Diffstat (limited to 'source4/lib/util/time.c')
-rw-r--r-- | source4/lib/util/time.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/util/time.c b/source4/lib/util/time.c index e5d7e2bca5..c800fffea0 100644 --- a/source4/lib/util/time.c +++ b/source4/lib/util/time.c @@ -116,7 +116,7 @@ _PUBLIC_ void unix_to_nt_time(NTTIME *nt, time_t t) /** check if it's a null unix time **/ -_PUBLIC_ BOOL null_time(time_t t) +_PUBLIC_ bool null_time(time_t t) { return t == 0 || t == (time_t)0xFFFFFFFF || @@ -127,7 +127,7 @@ _PUBLIC_ BOOL null_time(time_t t) /** check if it's a null NTTIME **/ -_PUBLIC_ BOOL null_nttime(NTTIME t) +_PUBLIC_ bool null_nttime(NTTIME t) { return t == 0 || t == (NTTIME)-1; } @@ -403,9 +403,9 @@ _PUBLIC_ struct timeval timeval_zero(void) } /** - return True if a timeval is zero + return true if a timeval is zero */ -_PUBLIC_ BOOL timeval_is_zero(const struct timeval *tv) +_PUBLIC_ bool timeval_is_zero(const struct timeval *tv) { return tv->tv_sec == 0 && tv->tv_usec == 0; } @@ -481,13 +481,13 @@ _PUBLIC_ int timeval_compare(const struct timeval *tv1, const struct timeval *tv } /** - return True if a timer is in the past + return true if a timer is in the past */ -_PUBLIC_ BOOL timeval_expired(const struct timeval *tv) +_PUBLIC_ bool timeval_expired(const struct timeval *tv) { struct timeval tv2 = timeval_current(); - if (tv2.tv_sec > tv->tv_sec) return True; - if (tv2.tv_sec < tv->tv_sec) return False; + if (tv2.tv_sec > tv->tv_sec) return true; + if (tv2.tv_sec < tv->tv_sec) return false; return (tv2.tv_usec >= tv->tv_usec); } |