diff options
author | Volker Lendecke <vl@samba.org> | 2012-06-08 14:29:41 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-06-08 21:29:20 +0200 |
commit | a3b4a5d7793b208436e541f2382c96c35fa31089 (patch) | |
tree | 45adeeba660c29b3c8bced50d5a5f130034ee093 | |
parent | 4aea0c1fa1dab5f9480a9e5e1ea5e4af18ac061e (diff) | |
download | samba-a3b4a5d7793b208436e541f2382c96c35fa31089.tar.gz samba-a3b4a5d7793b208436e541f2382c96c35fa31089.tar.bz2 samba-a3b4a5d7793b208436e541f2382c96c35fa31089.zip |
s3: Assigning ?True:False to a bool is a bit pointless
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | source3/smbd/open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a098124618..d5fba4db19 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -776,12 +776,11 @@ static NTSTATUS open_file(files_struct *fsp, fsp->vuid = req ? req->vuid : UID_FIELD_INVALID; fsp->file_pid = req ? req->smbpid : 0; fsp->can_lock = True; - fsp->can_read = (access_mask & FILE_READ_DATA) ? True : False; + fsp->can_read = ((access_mask & FILE_READ_DATA) != 0); if (!CAN_WRITE(conn)) { fsp->can_write = False; } else { - fsp->can_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ? - True : False; + fsp->can_write = ((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0); } fsp->print_file = NULL; fsp->modified = False; |