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>
status = smb_raw_pathinfo(cli->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, \
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, \