vfs_streams_depot: remove indentation
authorRalph Boehme <slow@samba.org>
Thu, 21 Jan 2021 15:29:46 +0000 (16:29 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 28 Jan 2021 08:11:49 +0000 (08:11 +0000)
Makes the code easier to read.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_depot.c

index a5e02d5a0698bfcd642bf4f4b436648273c16134..91e23311b4e12b7515a0e0affa25bb8f5bbc7c87 100644 (file)
@@ -694,6 +694,7 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
                                int flags)
 {
        struct smb_filename *smb_fname_base = NULL;
+       char *dirname = NULL;
        int ret = -1;
 
        DEBUG(10, ("streams_depot_unlink called for %s\n",
@@ -751,30 +752,31 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
         * check is already done in the caller. Remove the
         * file *after* the streams.
         */
-       {
-               char *dirname = stream_dir(handle, smb_fname_base,
-                                          &smb_fname_base->st, false);
-
-               if (dirname != NULL) {
-                       struct smb_filename *smb_fname_dir =
-                               synthetic_smb_fname(talloc_tos(),
-                                               dirname,
-                                               NULL,
-                                               NULL,
-                                               smb_fname->twrp,
-                                               smb_fname->flags);
-                       if (smb_fname_dir == NULL) {
-                               TALLOC_FREE(smb_fname_base);
-                               TALLOC_FREE(dirname);
-                               errno = ENOMEM;
-                               return -1;
-                       }
-                       SMB_VFS_NEXT_UNLINKAT(handle,
-                               dirfsp,
-                               smb_fname_dir,
-                               AT_REMOVEDIR);
-                       TALLOC_FREE(smb_fname_dir);
+       dirname = stream_dir(handle,
+                            smb_fname_base,
+                            &smb_fname_base->st,
+                            false);
+       if (dirname != NULL) {
+               struct smb_filename *smb_fname_dir = NULL;
+
+               smb_fname_dir = synthetic_smb_fname(talloc_tos(),
+                                                   dirname,
+                                                   NULL,
+                                                   NULL,
+                                                   smb_fname->twrp,
+                                                   smb_fname->flags);
+               if (smb_fname_dir == NULL) {
+                       TALLOC_FREE(smb_fname_base);
+                       TALLOC_FREE(dirname);
+                       errno = ENOMEM;
+                       return -1;
                }
+
+               SMB_VFS_NEXT_UNLINKAT(handle,
+                                     dirfsp,
+                                     smb_fname_dir,
+                                     AT_REMOVEDIR);
+               TALLOC_FREE(smb_fname_dir);
                TALLOC_FREE(dirname);
        }