diff options
author | 2016-02-05 11:30:00 -0800 | |
---|---|---|
committer | 2016-02-05 11:30:00 -0800 | |
commit | 309830f6b8c09347db305acf3b05fca333030989 (patch) | |
tree | f2eb8c7cc20f3320cee8221f2ebd0190c05f8671 /test/core/support | |
parent | b59b142799fe28482162bc192d6205fcb749c6c4 (diff) |
Replace 'long' with 'int64_t' in public core headers
Diffstat (limited to 'test/core/support')
-rw-r--r-- | test/core/support/avl_test.c | 2 | ||||
-rw-r--r-- | test/core/support/sync_test.c | 2 | ||||
-rw-r--r-- | test/core/support/time_test.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/core/support/avl_test.c b/test/core/support/avl_test.c index d8d8b36806..6dae53c1df 100644 --- a/test/core/support/avl_test.c +++ b/test/core/support/avl_test.c @@ -48,7 +48,7 @@ static int *box(int x) { return b; } -static long int_compare(void *int1, void *int2) { +static int64_t int_compare(void *int1, void *int2) { return (*(int *)int1) - (*(int *)int2); } static void *int_copy(void *p) { return box(*(int *)p); } diff --git a/test/core/support/sync_test.c b/test/core/support/sync_test.c index 0149bc3afd..acb5101536 100644 --- a/test/core/support/sync_test.c +++ b/test/core/support/sync_test.c @@ -251,7 +251,7 @@ static void test(const char *name, void (*body)(void *m), gpr_timespec start = gpr_now(GPR_CLOCK_REALTIME); gpr_timespec time_taken; gpr_timespec deadline = gpr_time_add( - start, gpr_time_from_micros(timeout_s * 1000000, GPR_TIMESPAN)); + start, gpr_time_from_micros((int64_t)timeout_s * 1000000, GPR_TIMESPAN)); fprintf(stderr, "%s:", name); while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0) { iterations <<= 1; diff --git a/test/core/support/time_test.c b/test/core/support/time_test.c index fc26f94d29..5285a2c75b 100644 --- a/test/core/support/time_test.c +++ b/test/core/support/time_test.c @@ -125,15 +125,15 @@ static void test_values(void) { } /* Test possible overflow in conversion of -ve values. */ - x = gpr_time_from_micros(-(LONG_MAX - 999997), GPR_TIMESPAN); + x = gpr_time_from_micros(-(INT64_MAX - 999997), GPR_TIMESPAN); GPR_ASSERT(x.tv_sec < 0); GPR_ASSERT(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); - x = gpr_time_from_nanos(-(LONG_MAX - 999999997), GPR_TIMESPAN); + x = gpr_time_from_nanos(-(INT64_MAX - 999999997), GPR_TIMESPAN); GPR_ASSERT(x.tv_sec < 0); GPR_ASSERT(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); - x = gpr_time_from_millis(-(LONG_MAX - 997), GPR_TIMESPAN); + x = gpr_time_from_millis(-(INT64_MAX - 997), GPR_TIMESPAN); GPR_ASSERT(x.tv_sec < 0); GPR_ASSERT(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); |