summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-09-02 12:53:04 +0200
committerJeremy Allison <jra@samba.org>2012-09-04 15:15:00 -0700
commit0d869327edaede4f573cd607a14538d92160a286 (patch)
tree185bc3a51a9d69f87f791f4aad0e20b4adb52cd9
parent25bdc3641890cc0fc5f4587e011c968d4b4f6a6b (diff)
downloadsamba-0d869327edaede4f573cd607a14538d92160a286.tar.gz
samba-0d869327edaede4f573cd607a14538d92160a286.tar.bz2
samba-0d869327edaede4f573cd607a14538d92160a286.zip
s3: Slightly simplify open_file_ntcreate
We have not set flags2 before, so do direct assignment and not |= Signed-off-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/open.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 5714157970..dc775dceab 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1942,14 +1942,14 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
case FILE_SUPERSEDE:
/* If file exists replace/overwrite. If file doesn't
* exist create. */
- flags2 |= (O_CREAT | O_TRUNC);
+ flags2 = (O_CREAT | O_TRUNC);
clear_ads = true;
break;
case FILE_OVERWRITE_IF:
/* If file exists replace/overwrite. If file doesn't
* exist create. */
- flags2 |= (O_CREAT | O_TRUNC);
+ flags2 = (O_CREAT | O_TRUNC);
clear_ads = true;
break;
@@ -1976,7 +1976,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
errno = ENOENT;
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- flags2 |= O_TRUNC;
+ flags2 = O_TRUNC;
clear_ads = true;
break;
@@ -1995,13 +1995,13 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
}
return map_nt_error_from_unix(errno);
}
- flags2 |= (O_CREAT|O_EXCL);
+ flags2 = (O_CREAT|O_EXCL);
break;
case FILE_OPEN_IF:
/* If file exists open. If file doesn't exist
* create. */
- flags2 |= O_CREAT;
+ flags2 = O_CREAT;
break;
default: