diff options
author | Volker Lendecke <vl@samba.org> | 2020-03-26 14:33:58 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-04-08 14:46:39 +0000 |
commit | aa1f34219d46b200f4c955232db4558e6260c8d8 (patch) | |
tree | ed5041a4120937e942b55c9202bb97b6255f0786 /source3/libsmb/clirap.c | |
parent | 6cb1f20f73ed79f4d3717ebf4c8923707ef62ac3 (diff) | |
download | samba-aa1f34219d46b200f4c955232db4558e6260c8d8.tar.gz |
libsmb: Make cli_setpathinfo_ext() take structs instead of pointers
This simplifies the next commit: With direct (small) structs on the
stack we don't need declared variables in the callers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 71c7b97ad54..d0cdaef716d 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -796,10 +796,10 @@ NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname, } NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname, - const struct timespec *create_time, - const struct timespec *access_time, - const struct timespec *write_time, - const struct timespec *change_time, + struct timespec create_time, + struct timespec access_time, + struct timespec write_time, + struct timespec change_time, uint16_t mode) { unsigned int data_len = 0; @@ -811,16 +811,20 @@ NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname, /* * Add the create, last access, modification, and status change times */ - put_long_date_full_timespec(TIMESTAMP_SET_NT_OR_BETTER, p, create_time); + put_long_date_full_timespec( + TIMESTAMP_SET_NT_OR_BETTER, p, &create_time); p += 8; - put_long_date_full_timespec(TIMESTAMP_SET_NT_OR_BETTER, p, access_time); + put_long_date_full_timespec( + TIMESTAMP_SET_NT_OR_BETTER, p, &access_time); p += 8; - put_long_date_full_timespec(TIMESTAMP_SET_NT_OR_BETTER, p, write_time); + put_long_date_full_timespec( + TIMESTAMP_SET_NT_OR_BETTER, p, &write_time); p += 8; - put_long_date_full_timespec(TIMESTAMP_SET_NT_OR_BETTER, p, change_time); + put_long_date_full_timespec( + TIMESTAMP_SET_NT_OR_BETTER, p, &change_time); p += 8; if (mode == (uint16_t)-1 || mode == FILE_ATTRIBUTE_NORMAL) { |