diff options
author | Volker Lendecke <vl@samba.org> | 2022-09-15 08:55:01 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-09-17 05:15:04 +0000 |
commit | 6e5d79ff40892b4f8f4962b36c1c3fb2d2ce9d55 (patch) | |
tree | a6c77e64228f3231513b981753f21fb2a47e4136 /source3/modules | |
parent | f3350bff4532b35b3c9e99e0d0865ecec55e1be5 (diff) | |
download | samba-6e5d79ff40892b4f8f4962b36c1c3fb2d2ce9d55.tar.gz |
shadow_copy2: Remove an intermediate if-statement
Now we always pass in a dirfsp from our only caller
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Sep 17 05:15:04 UTC 2022 on sn-devel-184
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_shadow_copy2.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 85dec164d50..43f02488f84 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -2634,7 +2634,7 @@ static const char *shadow_copy2_connectpath( char *stripped = NULL; char *tmp = NULL; const char *fname = smb_fname_in->base_name; - const struct smb_filename *full = smb_fname_in; + const struct smb_filename *full = NULL; struct smb_filename smb_fname = {0}; struct smb_filename *result_fname = NULL; char *result = NULL; @@ -2654,12 +2654,10 @@ static const char *shadow_copy2_connectpath( return priv->shadow_connectpath; } - if (dirfsp != NULL) { - full = full_path_from_dirfsp_atname( - talloc_tos(), dirfsp, smb_fname_in); - if (full == NULL) { - return NULL; - } + full = full_path_from_dirfsp_atname( + talloc_tos(), dirfsp, smb_fname_in); + if (full == NULL) { + return NULL; } if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, full, |