s3-torture: fix some truncation warnings
authorUri Simchoni <uri@samba.org>
Sun, 19 Nov 2017 18:37:49 +0000 (18:37 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 Nov 2017 09:20:21 +0000 (10:20 +0100)
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/torture/torture.c

index 481154fc36f89d9ac543e493987a442f9edede40..f98783e46e236d1c9fc8e975c1667d158fba0010 100644 (file)
@@ -3214,7 +3214,7 @@ static bool run_attrtest(int dummy)
                correct = False;
        }
 
-       if (abs(t - time(NULL)) > 60*60*24*10) {
+       if (labs(t - time(NULL)) > 60*60*24*10) {
                printf("ERROR: SMBgetatr bug. time is %s",
                       ctime(&t));
                t = time(NULL);
@@ -3445,13 +3445,13 @@ static bool run_trans2test(int dummy)
                        printf("modify time=%s", ctime(&m_time));
                        printf("This system appears to have sticky create times\n");
                }
-               if ((abs(a_time - t) > 60) && (a_time % (60*60) == 0)) {
+               if ((labs(a_time - t) > 60) && (a_time % (60*60) == 0)) {
                        printf("access time=%s", ctime(&a_time));
                        printf("This system appears to set a midnight access time\n");
                        correct = False;
                }
 
-               if (abs(m_time - t) > 60*60*24*7) {
+               if (labs(m_time - t) > 60*60*24*7) {
                        printf("ERROR: totally incorrect times - maybe word reversed? mtime=%s", ctime(&m_time));
                        correct = False;
                }