1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3: Slightly simplify fd_open_atomic

Replace an if-statement by a direct assignment

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep  5 01:56:46 CEST 2012 on sn-devel-104
This commit is contained in:
Volker Lendecke 2012-09-03 12:57:18 +02:00 committed by Jeremy Allison
parent d95d32606b
commit 084978f3d0

View File

@ -563,14 +563,13 @@ static NTSTATUS fd_open_atomic(struct connection_struct *conn,
* Fail if already exists, just pass through.
*/
status = fd_open(conn, fsp, flags, mode);
if (NT_STATUS_IS_OK(status)) {
/*
* Here we've opened with O_CREAT|O_EXCL
* and got success. We *know* we created
* this file.
*/
*file_created = true;
}
/*
* Here we've opened with O_CREAT|O_EXCL. If that went
* NT_STATUS_OK, we *know* we created this file.
*/
*file_created = NT_STATUS_IS_OK(status);
return status;
}