diff options
author | Uri Simchoni <uri@samba.org> | 2017-11-19 17:13:26 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-11-22 10:20:20 +0100 |
commit | a83953a094f1a41f3633ae24cdfd3a6cb804d986 (patch) | |
tree | bad987d11191659a86f9ce38903282f18eb3a0ed /source4/torture/smb2 | |
parent | 5fd04020c2bd5ae24f434ddef5976b39c2bfe2b4 (diff) | |
download | samba-a83953a094f1a41f3633ae24cdfd3a6cb804d986.tar.gz |
s4-torture: fix file time checks
NTTIME is an unsigned quantity. When comparing two
of them, first calculate a signed difference, then
take absolute value.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r-- | source4/torture/smb2/create.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c index 397c07516dd..ead56eb5c40 100644 --- a/source4/torture/smb2/create.c +++ b/source4/torture/smb2/create.c @@ -81,7 +81,7 @@ status = smb2_getinfo_file(tree, tctx, &finfo); \ CHECK_STATUS(status, NT_STATUS_OK); \ t2 = finfo.all_info.out.field; \ - if (abs(t-t2) > 20000) { \ + if (llabs((int64_t)(t-t2)) > 20000) { \ torture_result(tctx, TORTURE_FAIL, \ "(%s) wrong time for field %s %s - %s\n", \ __location__, #field, \ |