aboutsummaryrefslogtreecommitdiff
path: root/tests/test-bus.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2015-11-12 22:56:32 -0500
committerPaul Selkirk <paul@psgd.org>2015-11-12 22:56:32 -0500
commit49ac8847de1120a4ae7b72747ee259bc0f5ffb3c (patch)
treea166cf13aafd1269a22d587c6b50efc3ba1f1114 /tests/test-bus.c
parent29408da58bedf999e6b475649053e4348e88e3ba (diff)
fix printf warnings, fix time_check calculation
Diffstat (limited to 'tests/test-bus.c')
-rw-r--r--tests/test-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-bus.c b/tests/test-bus.c
index 3af4dc9..bffe5d3 100644
--- a/tests/test-bus.c
+++ b/tests/test-bus.c
@@ -80,7 +80,7 @@ static int sanity(void)
}
if (data != rnd) {
- printf("Data bus fail: expected %08x, got %08x, diff %08x\n", rnd, data, data ^ rnd);
+ printf("Data bus fail: expected %08lx, got %08lx, diff %08lx\n", rnd, data, data ^ rnd);
return 1;
}
@@ -97,7 +97,7 @@ static void _time_check(char *label, const struct timeval t0, const int err)
float rounds;
gettimeofday(&t, NULL);
t.tv_sec -= t0.tv_sec;
- t.tv_usec = t0.tv_usec;
+ t.tv_usec -= t0.tv_usec;
if (t.tv_usec < 0) {
t.tv_usec += 1000000;
t.tv_sec -= 1;