From a7d39ed14334c6a959d68ecd7eb451becf6a35e5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 30 Oct 2020 18:49:52 +0100 Subject: [PATCH] libsmb: Remove "mntpoint" argument from cli_list_trans() callback This was unused in the callers, also do this for symmetry. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libsmb/clilist.c | 8 +++++--- source3/libsmb/proto.h | 6 ++++-- source3/torture/masktest.c | 6 ++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 48635b9cac8..d0abd476d74 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -922,8 +922,10 @@ static NTSTATUS cli_list_trans_recv(struct tevent_req *req, NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask, uint32_t attribute, int info_level, - NTSTATUS (*fn)(const char *mnt, struct file_info *finfo, - const char *mask, void *private_data), + NTSTATUS (*fn)( + struct file_info *finfo, + const char *mask, + void *private_data), void *private_data) { TALLOC_CTX *frame = talloc_stackframe(); @@ -957,7 +959,7 @@ NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask, } num_finfo = talloc_array_length(finfo); for (i=0; idfs_mountpoint, &finfo[i], mask, private_data); + status = fn(&finfo[i], mask, private_data); if (!NT_STATUS_IS_OK(status)) { goto fail; } diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 5715a0173ec..8fd3a436fd5 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -746,8 +746,10 @@ NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint32_t attribute, const char *, void *), void *state); NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask, uint32_t attribute, int info_level, - NTSTATUS (*fn)(const char *mnt, struct file_info *finfo, - const char *mask, void *private_data), + NTSTATUS (*fn)( + struct file_info *finfo, + const char *mask, + void *private_data), void *private_data); struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index ac73a477a6b..ebd156167cd 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -238,8 +238,10 @@ struct rn_state { char *short_name; }; -static NTSTATUS listfn(const char *mnt, struct file_info *f, const char *s, - void *private_data) +static NTSTATUS listfn( + struct file_info *f, + const char *s, + void *private_data) { struct rn_state *state = (struct rn_state *)private_data; if (strcmp(f->name,".") == 0) { -- 2.47.3