summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-07-11 13:21:20 +0200
committerStefan Metzmacher <metze@samba.org>2014-07-22 15:32:39 +0200
commita48c0a42ce44bffc6132ce19555aa8f168c8957a (patch)
treecac5fa1187c76c1e5be51a84e6a0407c932fecba /source3/locking
parent2d8576ea7cdf50c53ea7be68134918aacfbaf5b5 (diff)
downloadsamba-a48c0a42ce44bffc6132ce19555aa8f168c8957a.tar.gz
smbd: Fix indentation, {} and line length in brl_conflict_other
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index e3f829574a8..e881b8fd78d 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -227,29 +227,37 @@ static bool brl_conflict1(const struct lock_struct *lck1,
This is never used in the POSIX lock case.
****************************************************************************/
-static bool brl_conflict_other(const struct lock_struct *lock, const struct lock_struct *rw_probe)
+static bool brl_conflict_other(const struct lock_struct *lock,
+ const struct lock_struct *rw_probe)
{
- if (IS_PENDING_LOCK(lock->lock_type) || IS_PENDING_LOCK(rw_probe->lock_type))
+ if (IS_PENDING_LOCK(lock->lock_type) ||
+ IS_PENDING_LOCK(rw_probe->lock_type)) {
return False;
+ }
- if (lock->lock_type == READ_LOCK && rw_probe->lock_type == READ_LOCK)
+ if (lock->lock_type == READ_LOCK && rw_probe->lock_type == READ_LOCK) {
return False;
+ }
/* POSIX flavour locks never conflict here - this is only called
in the read/write path. */
- if (lock->lock_flav == POSIX_LOCK && rw_probe->lock_flav == POSIX_LOCK)
+ if (lock->lock_flav == POSIX_LOCK &&
+ rw_probe->lock_flav == POSIX_LOCK) {
return False;
+ }
/*
* Incoming WRITE locks conflict with existing READ locks even
* if the context is the same. JRA. See LOCKTEST7 in smbtorture.
*/
- if (!(rw_probe->lock_type == WRITE_LOCK && lock->lock_type == READ_LOCK)) {
+ if (!(rw_probe->lock_type == WRITE_LOCK &&
+ lock->lock_type == READ_LOCK)) {
if (brl_same_context(&lock->context, &rw_probe->context) &&
- lock->fnum == rw_probe->fnum)
+ lock->fnum == rw_probe->fnum) {
return False;
+ }
}
return brl_overlap(lock, rw_probe);