mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
smbd: Remove unused _prev_offset arg from smbd_dirptr_get_entry()
Neither of the two callers looked at the result. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
94648811f5
commit
99799bcdc8
@ -562,8 +562,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
char **_fname,
|
||||
struct smb_filename **_smb_fname,
|
||||
uint32_t *_mode,
|
||||
long *_prev_offset)
|
||||
uint32_t *_mode)
|
||||
{
|
||||
connection_struct *conn = dirptr->conn;
|
||||
struct smb_Dir *dir_hnd = dirptr->dir_hnd;
|
||||
@ -589,7 +588,6 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
|
||||
while (true) {
|
||||
long cur_offset;
|
||||
long prev_offset;
|
||||
SMB_STRUCT_STAT sbuf = { 0 };
|
||||
char *dname = NULL;
|
||||
bool isdots;
|
||||
@ -603,7 +601,6 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
bool ok;
|
||||
|
||||
cur_offset = dptr_TellDir(dirptr);
|
||||
prev_offset = cur_offset;
|
||||
dname = dptr_ReadDirName(ctx, dirptr, &cur_offset, &sbuf);
|
||||
|
||||
DBG_DEBUG("dir [%s] dirptr [0x%lx] offset [%ld] => "
|
||||
@ -888,7 +885,6 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
}
|
||||
*_fname = fname;
|
||||
*_mode = mode;
|
||||
*_prev_offset = prev_offset;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -181,8 +181,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
|
||||
void *private_data,
|
||||
char **_fname,
|
||||
struct smb_filename **_smb_fname,
|
||||
uint32_t *_mode,
|
||||
long *_prev_offset);
|
||||
uint32_t *_mode);
|
||||
void smbd_dirptr_push_overflow(struct dptr_struct *dirptr,
|
||||
char **_fname,
|
||||
struct smb_filename **_smb_fname,
|
||||
|
@ -1241,7 +1241,6 @@ static bool get_dir_entry(TALLOC_CTX *ctx,
|
||||
char *fname = NULL;
|
||||
struct smb_filename *smb_fname = NULL;
|
||||
uint32_t mode = 0;
|
||||
long prev_offset;
|
||||
bool ok;
|
||||
|
||||
ok = smbd_dirptr_get_entry(ctx,
|
||||
@ -1256,8 +1255,7 @@ static bool get_dir_entry(TALLOC_CTX *ctx,
|
||||
conn,
|
||||
&fname,
|
||||
&smb_fname,
|
||||
&mode,
|
||||
&prev_offset);
|
||||
&mode);
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1919,7 +1919,6 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
|
||||
{
|
||||
const char *p;
|
||||
const char *mask = NULL;
|
||||
long prev_dirpos = 0;
|
||||
uint32_t mode = 0;
|
||||
char *fname = NULL;
|
||||
struct smb_filename *smb_fname = NULL;
|
||||
@ -1967,8 +1966,7 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
|
||||
&state,
|
||||
&fname,
|
||||
&smb_fname,
|
||||
&mode,
|
||||
&prev_dirpos);
|
||||
&mode);
|
||||
if (!ok) {
|
||||
return NT_STATUS_END_OF_FILE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user