From: Ralph Boehme Date: Thu, 21 Jan 2021 15:29:46 +0000 (+0100) Subject: vfs_streams_depot: remove indentation X-Git-Tag: tevent-0.11.0~1933 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3e1170dcd426e2fe9ace434ed56d71d24993121;p=thirdparty%2Fsamba.git vfs_streams_depot: remove indentation Makes the code easier to read. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index a5e02d5a069..91e23311b4e 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -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); }