summaryrefslogtreecommitdiff
path: root/test/testatomic.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2013-04-21 21:25:59 +0000
committerStefan Fritsch <sf@apache.org>2013-04-21 21:25:59 +0000
commit9d18bbb3cf3a99744e679a081499b92504cabadf (patch)
tree396fd64fbcb0f405734416e825f9814304b1ddcd /test/testatomic.c
parent08fd9446d37235e84588f47e7067ae035e2b0bed (diff)
downloadapr-9d18bbb3cf3a99744e679a081499b92504cabadf.tar.gz
Fix amd64 assembler version of apr_atomic_xchgptr()
PR: 51851 Submitted by: Mattias EngdegÄrd <mattiase acm org> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1470348 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testatomic.c')
-rw-r--r--test/testatomic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index cfea2a62c..8e00fb192 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -84,11 +84,12 @@ static void test_xchg32(abts_case *tc, void *data)
static void test_xchgptr(abts_case *tc, void *data)
{
int a;
- volatile void *target_ptr = NULL;
+ void *ref = "little piggy";
+ volatile void *target_ptr = ref;
void *old_ptr;
old_ptr = apr_atomic_xchgptr(&target_ptr, &a);
- ABTS_PTR_EQUAL(tc, NULL, old_ptr);
+ ABTS_PTR_EQUAL(tc, ref, old_ptr);
ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr);
}