]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove unused "pst" parameter from dptr_SearchDir()
authorVolker Lendecke <vl@samba.org>
Fri, 9 Jun 2023 07:33:42 +0000 (09:33 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 13 Jun 2023 23:33:39 +0000 (23:33 +0000)
The only caller threw the result away.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c
source3/smbd/proto.h
source3/smbd/smb1_trans2.c

index 5979e1cf72b638086363a9a458690289306f596d..66b277fd7d20d6bc0944716e4d2bc7be9b1e3f74 100644 (file)
@@ -531,10 +531,8 @@ ret:
  Search for a file by name.
 ****************************************************************************/
 
-bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
+bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset)
 {
-       SET_STAT_INVALID(*pst);
-
        if (!dptr->has_wild && (dptr->dir_hnd->offset == END_OF_DIRECTORY_OFFSET)) {
                /* This is a singleton directory and we're already at the end. */
                *poffset = END_OF_DIRECTORY_OFFSET;
index daa5dc6bb484acd004b3f7ca8468c9e8a7077263..f1364a45e37e3355041b21a204a0adb3daa9965f 100644 (file)
@@ -200,7 +200,7 @@ int dptr_dnum(struct dptr_struct *dptr);
 bool dptr_get_priv(struct dptr_struct *dptr);
 void dptr_set_priv(struct dptr_struct *dptr);
 bool dptr_case_sensitive(struct dptr_struct *dptr);
-bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst);
+bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset);
 struct smb_Dir;
 struct files_struct *dir_hnd_fetch_fsp(struct smb_Dir *dir_hnd);
 files_struct *dptr_fetch_lanman2_fsp(struct smbd_server_connection *sconn,
index 42475c20d458b08782c5d43ee518bb77a3ba99a3..af034d255ecd1ffdaeca9414260ac26fdf2a2c61 100644 (file)
@@ -1508,7 +1508,6 @@ static void call_trans2findnext(connection_struct *conn,
         */
 
        if(!continue_bit && resume_name && *resume_name) {
-               SMB_STRUCT_STAT st;
                bool posix_open = (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN);
 
                long current_pos = 0;
@@ -1539,7 +1538,8 @@ static void call_trans2findnext(connection_struct *conn,
                 * should already be at the correct place.
                 */
 
-               finished = !dptr_SearchDir(fsp->dptr, resume_name, &current_pos, &st);
+               finished =
+                       !dptr_SearchDir(fsp->dptr, resume_name, &current_pos);
        } /* end if resume_name && !continue_bit */
 
        ask_sharemode = fsp_search_ask_sharemode(fsp);