summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-26 13:50:21 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-26 13:50:21 +0000
commit947ac46eb8289d3fd68726abf968e8cd11282de9 (patch)
tree60a44aab2cd7b0a4f08798a2ed5d2f550ec94cc7 /regress
parent68f837a46a330e10565b10f049139386283a1ac5 (diff)
Use sizeof(double) instead of hardcoding 8.
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libpthread/preemption_float/preemption_float.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/lib/libpthread/preemption_float/preemption_float.c b/regress/lib/libpthread/preemption_float/preemption_float.c
index 1f0b571d4d2..0ac33c8bbfa 100644
--- a/regress/lib/libpthread/preemption_float/preemption_float.c
+++ b/regress/lib/libpthread/preemption_float/preemption_float.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preemption_float.c,v 1.4 2003/07/31 21:48:05 deraadt Exp $ */
+/* $OpenBSD: preemption_float.c,v 1.5 2010/12/26 13:50:20 miod Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
@@ -62,7 +62,7 @@ log_loop (void *x) {
d2 = d;
d = sin(d);
/* if (d2 != d1) { */
- if (memcmp (&d2, &d1, 8)) {
+ if (memcmp (&d2, &d1, sizeof(double))) {
printf("log loop: %f != %f\n", d1, d2);
pthread_exit(&float_failed);
}
@@ -88,7 +88,7 @@ trig_loop (void *x) {
d2 = d;
d = sin(d);
/* if (d2 != d1) { */
- if (memcmp (&d2, &d1, 8)) {
+ if (memcmp (&d2, &d1, sizeof(double))) {
printf("trig loop: %f != %f\n", d1, d2);
pthread_exit(&float_failed);
}