s4-torture: another unsigned comparison bug
authorAndrew Tridgell <tridge@samba.org>
Sat, 19 Dec 2009 23:27:17 +0000 (10:27 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 21 Dec 2009 12:41:08 +0000 (23:41 +1100)
source4/torture/raw/qfileinfo.c

index 85f9f1b093295f7f4ccfa0a60aefe7b1849b3887..032df87a4d1635462feb03cf11949b8b9c272ca7 100644 (file)
@@ -140,7 +140,7 @@ static int dos_nt_time_cmp(time_t t, NTTIME nt)
 {
        time_t t2 = nt_time_to_unix(nt);
        if (abs(t2 - t) <= 2) return 0;
-       return t2 - t;
+       return t2 > t ? 1 : -1;
 }