smbd: Remove 2 indentation levels
authorVolker Lendecke <vl@samba.org>
Wed, 25 Jun 2014 08:36:47 +0000 (08:36 +0000)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 25 Jun 2014 09:22:12 +0000 (11:22 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/smbd/open.c

index 687caee6ab36c91da43fd08a562a8fc90f5105e3..a8bd974a3bbb22ae1733a64159a6b0e5141945a8 100644 (file)
@@ -2680,17 +2680,17 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
        }
 
        /* Should we atomically (to the client at least) truncate ? */
-       if (!new_file_created) {
-               if (flags2 & O_TRUNC) {
-                       if (!S_ISFIFO(fsp->fsp_name->st.st_ex_mode)) {
-                               int ret = vfs_set_filelen(fsp, 0);
-                               if (ret != 0) {
-                                       status = map_nt_error_from_unix(errno);
-                                       TALLOC_FREE(lck);
-                                       fd_close(fsp);
-                                       return status;
-                               }
-                       }
+       if ((!new_file_created) &&
+           (flags2 & O_TRUNC) &&
+           (!S_ISFIFO(fsp->fsp_name->st.st_ex_mode))) {
+               int ret;
+
+               ret = vfs_set_filelen(fsp, 0);
+               if (ret != 0) {
+                       status = map_nt_error_from_unix(errno);
+                       TALLOC_FREE(lck);
+                       fd_close(fsp);
+                       return status;
                }
        }