summaryrefslogtreecommitdiff
path: root/memcheck
diff options
context:
space:
mode:
authorsewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2008-11-08 15:14:01 +0000
committersewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2008-11-08 15:14:01 +0000
commit9ec6af646a19a06cb5abf908b5afcdc4e15eb3c4 (patch)
tree5b2e69f22d4d006146cff5a7ed4b9057be23dc16 /memcheck
parent131defc8fe453160005c4e619a6d79b594c35e1b (diff)
Use a "sided" comparison rather than a "point" comparison, so as to
ensure that gcc generates only one conditional jump per conditional expression, not two. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8743 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'memcheck')
-rw-r--r--memcheck/tests/fprw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/memcheck/tests/fprw.c b/memcheck/tests/fprw.c
index f60038e8..6eb304d2 100644
--- a/memcheck/tests/fprw.c
+++ b/memcheck/tests/fprw.c
@@ -13,8 +13,8 @@ int main ( void )
int* ip = (int*)0x1234567;
d += 1.0;
f += 10.0;
- *dp += ( d ? 2.0 : 3.0 );
- *fp += ( f ? 20.0 : 21.0 );
+ *dp += ( d > 0.1 ? 2.0 : 3.0 );
+ *fp += ( f > 0.1 ? 20.0 : 21.0 );
free(dp);
free(fp);
*dp += 3.0;