diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-06 22:25:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:54 -0500 |
commit | 05e7c481465e3065effaf21b43636d6605d7c313 (patch) | |
tree | 6dd94046fbf6b2f2c61cb6cbde91841fa78f7e20 /source4/cluster/ctdb/brlock_ctdb.c | |
parent | 3642f3b40d755209a843745f160a9d7962a6deca (diff) | |
download | samba-05e7c481465e3065effaf21b43636d6605d7c313.tar.gz samba-05e7c481465e3065effaf21b43636d6605d7c313.tar.bz2 samba-05e7c481465e3065effaf21b43636d6605d7c313.zip |
r25553: Convert to standard bool type.
(This used to be commit b7371f1a191fb86834c0d586d094f39f0b04544b)
Diffstat (limited to 'source4/cluster/ctdb/brlock_ctdb.c')
-rw-r--r-- | source4/cluster/ctdb/brlock_ctdb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c index fecc88da45..8b633358a3 100644 --- a/source4/cluster/ctdb/brlock_ctdb.c +++ b/source4/cluster/ctdb/brlock_ctdb.c @@ -148,7 +148,7 @@ static struct brl_handle *brl_ctdb_create_handle(TALLOC_CTX *mem_ctx, struct ntv /* see if two locking contexts are equal */ -static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2) +static bool brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2) { return (cluster_id_equal(&ctx1->server, &ctx2->server) && ctx1->smbpid == ctx2->smbpid && @@ -158,7 +158,7 @@ static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context /* see if lck1 and lck2 overlap */ -static BOOL brl_ctdb_overlap(struct lock_struct *lck1, +static bool brl_ctdb_overlap(struct lock_struct *lck1, struct lock_struct *lck2) { /* this extra check is not redundent - it copes with locks @@ -166,35 +166,35 @@ static BOOL brl_ctdb_overlap(struct lock_struct *lck1, if (lck1->size != 0 && lck1->start == lck2->start && lck1->size == lck2->size) { - return True; + return true; } if (lck1->start >= (lck2->start+lck2->size) || lck2->start >= (lck1->start+lck1->size)) { - return False; + return false; } - return True; + return true; } /* See if lock2 can be added when lock1 is in place. */ -static BOOL brl_ctdb_conflict(struct lock_struct *lck1, +static bool brl_ctdb_conflict(struct lock_struct *lck1, struct lock_struct *lck2) { /* pending locks don't conflict with anything */ if (lck1->lock_type >= PENDING_READ_LOCK || lck2->lock_type >= PENDING_READ_LOCK) { - return False; + return false; } if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) { - return False; + return false; } if (brl_ctdb_same_context(&lck1->context, &lck2->context) && lck2->lock_type == READ_LOCK && lck1->ntvfs == lck2->ntvfs) { - return False; + return false; } return brl_ctdb_overlap(lck1, lck2); @@ -205,16 +205,16 @@ static BOOL brl_ctdb_conflict(struct lock_struct *lck1, Check to see if this lock conflicts, but ignore our own locks on the same fnum only. */ -static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2) +static bool brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2) { /* pending locks don't conflict with anything */ if (lck1->lock_type >= PENDING_READ_LOCK || lck2->lock_type >= PENDING_READ_LOCK) { - return False; + return false; } if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) - return False; + return false; /* * note that incoming write calls conflict with existing READ @@ -224,7 +224,7 @@ static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct if (brl_ctdb_same_context(&lck1->context, &lck2->context) && lck1->ntvfs == lck2->ntvfs && (lck2->lock_type == READ_LOCK || lck1->lock_type == WRITE_LOCK)) { - return False; + return false; } return brl_ctdb_overlap(lck1, lck2); |