diff options
author | Volker Lendecke <vl@samba.org> | 2012-06-01 15:21:12 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-03 17:23:28 +0200 |
commit | 8541829a9ab20c7fa8c892490284c31593eb2fb8 (patch) | |
tree | cf46e691c408a335c499cacebc63d8c201aacfe5 /source3/smbd | |
parent | 8486d514f5c964b6c20c36f2e7938ad9cd943c70 (diff) | |
download | samba-8541829a9ab20c7fa8c892490284c31593eb2fb8.tar.gz samba-8541829a9ab20c7fa8c892490284c31593eb2fb8.tar.bz2 samba-8541829a9ab20c7fa8c892490284c31593eb2fb8.zip |
s3: Slightly simplify close_remove_share_mode
Remove a level of indentation by more use of "continue;"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/close.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 3045990b98..e2d7c2c7a7 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -421,17 +421,22 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, POSIX delete now. */ for (i=0; i<lck->data->num_share_modes; i++) { struct share_mode_entry *e = &lck->data->share_modes[i]; - if (is_valid_share_mode_entry(e) && - e->name_hash == fsp->name_hash) { - if (fsp->posix_open && (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) { - continue; - } - if (share_mode_stale_pid(lck->data, i)) { - continue; - } - delete_file = False; - break; + + if (!is_valid_share_mode_entry(e)) { + continue; } + if (e->name_hash != fsp->name_hash) { + continue; + } + if (fsp->posix_open + && (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) { + continue; + } + if (share_mode_stale_pid(lck->data, i)) { + continue; + } + delete_file = False; + break; } } |