summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-06-18 12:21:06 +0000
committerJeremy Allison <jra@samba.org>2014-06-30 22:28:14 +0200
commitdcd6373613622852181a4dacdcf92ec2b9cb0112 (patch)
treee3bdc03bc94f4d9b5bb056174c021fff2a78780b /source3
parent9f3e89446847425881e07cafadddc2af8723e8c2 (diff)
lib: Align unix_timespec_to_nt_time with nt_time_to_unix_timespec
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c16
-rw-r--r--source3/lib/time.c2
-rw-r--r--source3/smbd/dosmode.c2
-rw-r--r--source3/smbd/smb2_create.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 17985b9d2b..c90c450447 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1725,16 +1725,16 @@ static int do_allinfo(const char *name)
return false;
}
- unix_timespec_to_nt_time(&tmp, b_time);
+ tmp = unix_timespec_to_nt_time(b_time);
d_printf("create_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, a_time);
+ tmp = unix_timespec_to_nt_time(a_time);
d_printf("access_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, m_time);
+ tmp = unix_timespec_to_nt_time(m_time);
d_printf("write_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, c_time);
+ tmp = unix_timespec_to_nt_time(c_time);
d_printf("change_time: %s\n", nt_time_string(talloc_tos(), tmp));
d_printf("attributes: %s (%x)\n", attr_str(talloc_tos(), mode), mode);
@@ -1804,13 +1804,13 @@ static int do_allinfo(const char *name)
TALLOC_FREE(snap_name);
continue;
}
- unix_timespec_to_nt_time(&tmp, b_time);
+ tmp = unix_timespec_to_nt_time(b_time);
d_printf("create_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, a_time);
+ tmp = unix_timespec_to_nt_time(a_time);
d_printf("access_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, m_time);
+ tmp =unix_timespec_to_nt_time(m_time);
d_printf("write_time: %s\n", nt_time_string(talloc_tos(), tmp));
- unix_timespec_to_nt_time(&tmp, c_time);
+ tmp = unix_timespec_to_nt_time(c_time);
d_printf("change_time: %s\n", nt_time_string(talloc_tos(), tmp));
d_printf("size: %d\n", (int)size);
}
diff --git a/source3/lib/time.c b/source3/lib/time.c
index dab9b3167a..98ab0c78d4 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -172,7 +172,7 @@ void put_long_date_timespec(enum timestamp_set_resolution res, char *p, struct t
{
NTTIME nt;
round_timespec(res, &ts);
- unix_timespec_to_nt_time(&nt, ts);
+ nt = unix_timespec_to_nt_time(ts);
SBVAL(p, 0, nt);
}
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 6a6f673750..b31b472e90 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -399,7 +399,7 @@ static bool set_ea_dos_attribute(connection_struct *conn,
dosattrib.info.info3.valid_flags = XATTR_DOSINFO_ATTRIB|
XATTR_DOSINFO_CREATE_TIME;
dosattrib.info.info3.attrib = dosmode;
- unix_timespec_to_nt_time(&dosattrib.info.info3.create_time,
+ dosattrib.info.info3.create_time = unix_timespec_to_nt_time(
smb_fname->st.st_ex_btime);
DEBUG(10,("set_ea_dos_attributes: set attribute 0x%x, btime = %s on file %s\n",
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 976e81a33a..d22df4da34 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -974,7 +974,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
if (mxac) {
NTTIME last_write_time;
- unix_timespec_to_nt_time(&last_write_time,
+ last_write_time = unix_timespec_to_nt_time(
result->fsp_name->st.st_ex_mtime);
if (last_write_time != max_access_time) {
uint8_t p[8];