s3: Slightly simplify open_file()
authorVolker Lendecke <vl@samba.org>
Tue, 4 Sep 2012 08:36:47 +0000 (10:36 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 26 Sep 2012 16:08:03 +0000 (18:08 +0200)
The "else" is not necessary. In the if-branch we just returned.

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 26 18:08:03 CEST 2012 on sn-devel-104

source3/smbd/open.c

index 1f9a372..10c855c 100644 (file)
@@ -678,7 +678,8 @@ static NTSTATUS open_file(files_struct *fsp,
                        DEBUG(3,("Permission denied opening %s\n",
                                 smb_fname_str_dbg(smb_fname)));
                        return NT_STATUS_ACCESS_DENIED;
-               } else if(flags & O_CREAT) {
+               }
+               if (flags & O_CREAT) {
                        /* We don't want to write - but we must make sure that
                           O_CREAT doesn't create the file if we have write
                           access into the directory.