To me, the "additive" SMB2_LEASE_WRITE|SMB2_LEASE_HANDLE is easier to
read than the negated ~SMB2_LEASE_READ.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
l->current_state,
l->breaking_to_required);
l->breaking_to_requested = l->breaking_to_required;
- if (l->current_state & (~SMB2_LEASE_READ)) {
+ if (l->current_state & (SMB2_LEASE_WRITE|SMB2_LEASE_HANDLE)) {
/*
* Here we break in steps, as windows does
* see the breaking3 and v2_breaking3 tests.
state->new_epoch = l->epoch;
}
- if (l->current_state & (~SMB2_LEASE_READ)) {
+ if (l->current_state & (SMB2_LEASE_WRITE|SMB2_LEASE_HANDLE)) {
state->break_flags =
SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED;
} else {