From 0d869327edaede4f573cd607a14538d92160a286 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 2 Sep 2012 12:53:04 +0200 Subject: s3: Slightly simplify open_file_ntcreate We have not set flags2 before, so do direct assignment and not |= Signed-off-by: Jeremy Allison --- source3/smbd/open.c | 10 +++++----- 1 file 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: -- cgit