diff options
author | Volker Lendecke <vl@samba.org> | 2012-06-01 16:13:22 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-03 17:23:28 +0200 |
commit | 2e95b77c993045cb448d36240ea38b44b5418c7e (patch) | |
tree | 5d4cee50d6ce37f8de6aa2927f4fb0dd574cb1cc | |
parent | dec08b8041c88211efa9efd190c3bb6b6946f599 (diff) | |
download | samba-2e95b77c993045cb448d36240ea38b44b5418c7e.tar.gz samba-2e95b77c993045cb448d36240ea38b44b5418c7e.tar.bz2 samba-2e95b77c993045cb448d36240ea38b44b5418c7e.zip |
s3: Make close_remove_share_mode a bit more readable
by introducing a variable simplifying a boolean expression
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/smbd/close.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index e2d7c2c7a7..d3232aae4f 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -341,6 +341,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, const struct security_unix_token *del_token = NULL; const struct security_token *del_nt_token = NULL; bool got_tokens = false; + bool normal_close; /* Ensure any pending write time updates are done. */ if (fsp->update_write_time_event) { @@ -449,8 +450,9 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, * reference to a file. */ - if (!(close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) || - !delete_file) { + normal_close = (close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE); + + if (!normal_close || !delete_file) { TALLOC_FREE(lck); return NT_STATUS_OK; } |