]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
streams_depot: Simplify walk_streams()
authorVolker Lendecke <vl@samba.org>
Sat, 18 Jan 2025 14:11:42 +0000 (15:11 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 23 Jan 2025 23:08:38 +0000 (23:08 +0000)
Remove unused pdirname parameter

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_depot.c

index 77f16ab703c199b6bfee4530a7b0d3f36c82f5ac..d2b8a02431fce85c59cc72c642c715ca7e7d7899 100644 (file)
@@ -494,7 +494,6 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
 
 static NTSTATUS walk_streams(vfs_handle_struct *handle,
                             struct smb_filename *smb_fname_base,
-                            char **pdirname,
                             bool (*fn)(const struct smb_filename *dirname,
                                        const char *dirent,
                                        void *private_data),
@@ -581,13 +580,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
        TALLOC_FREE(rootdir);
        TALLOC_FREE(dir_smb_fname);
        TALLOC_FREE(dir_hnd);
-
-       if (pdirname != NULL) {
-               *pdirname = dirname;
-       }
-       else {
-               TALLOC_FREE(dirname);
-       }
+       TALLOC_FREE(dirname);
 
        return NT_STATUS_OK;
 }
@@ -1171,7 +1164,6 @@ static NTSTATUS streams_depot_fstreaminfo(vfs_handle_struct *handle,
 
        status = walk_streams(handle,
                                smb_fname_base,
-                               NULL,
                                collect_one_stream,
                                &state);