Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libevent/dist/test timeval fields might not be ...



details:   https://anonhg.NetBSD.org/src/rev/75c97ed245d9
branches:  trunk
changeset: 806074:75c97ed245d9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jan 31 12:12:17 2015 +0000

description:
timeval fields might not be int, so use imaxabs.

diffstat:

 external/bsd/libevent/dist/test/regress.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 6be0090a36dc -r 75c97ed245d9 external/bsd/libevent/dist/test/regress.h
--- a/external/bsd/libevent/dist/test/regress.h Sat Jan 31 08:50:01 2015 +0000
+++ b/external/bsd/libevent/dist/test/regress.h Sat Jan 31 12:12:17 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: regress.h,v 1.4 2015/01/29 07:26:02 spz Exp $  */
+/*     $NetBSD: regress.h,v 1.5 2015/01/31 12:12:17 joerg Exp $        */
 /*
  * Copyright (c) 2000-2007 Niels Provos <provos%citi.umich.edu@localhost>
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -112,7 +112,7 @@
        } while (/*CONSTCOND*/0)
 
 #define test_timeval_diff_leq(tv1, tv2, diff, tolerance)               \
-       tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
+       tt_int_op(imaxabs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
 
 #define test_timeval_diff_eq(tv1, tv2, diff)                           \
        test_timeval_diff_leq((tv1), (tv2), (diff), 50)



Home | Main Index | Thread Index | Old Index