diff options
author | 2010-12-26 13:50:20 +0000 | |
---|---|---|
committer | 2010-12-26 13:50:20 +0000 | |
commit | f624289e6d27f6b2c3637045d15e255875b0fecc (patch) | |
tree | c6f631539f6b872c41a9bb23cad2831c7ee7e83d /regress/lib/libpthread/preemption_float/preemption_float.c | |
parent | nits with current being NULL or not. (diff) | |
download | wireguard-openbsd-f624289e6d27f6b2c3637045d15e255875b0fecc.tar.xz wireguard-openbsd-f624289e6d27f6b2c3637045d15e255875b0fecc.zip |
Use sizeof(double) instead of hardcoding 8.
Diffstat (limited to 'regress/lib/libpthread/preemption_float/preemption_float.c')
-rw-r--r-- | regress/lib/libpthread/preemption_float/preemption_float.c | 6 |
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); } |