diff options
author | Brian Pane <brianp@apache.org> | 2003-09-14 01:45:12 +0000 |
---|---|---|
committer | Brian Pane <brianp@apache.org> | 2003-09-14 01:45:12 +0000 |
commit | 3349697f3d2c6d83928632d609b9cb93c87466f8 (patch) | |
tree | 6bca8095005f35bc727acb5a158f144e62e672a1 /test/testatomic.c | |
parent | d9636e02666c1ecdaa6e46f34b28cdc753cfb13f (diff) | |
download | apr-3349697f3d2c6d83928632d609b9cb93c87466f8.tar.gz |
fix error message in add test
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64620 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testatomic.c')
-rw-r--r-- | test/testatomic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/testatomic.c b/test/testatomic.c index bed3d93f8..024c9dd15 100644 --- a/test/testatomic.c +++ b/test/testatomic.c @@ -68,6 +68,11 @@ #include <pthread.h> #endif +static void foo(apr_atomic_t *bar, long xyzzy) +{ + apr_atomic_add(bar, xyzzy); +} + apr_pool_t *context; apr_atomic_t y; /* atomic locks */ @@ -143,7 +148,7 @@ static apr_status_t check_basic_atomics(volatile apr_atomic_t*p) printf("%-60s", "testing add"); apr_atomic_set(&y, 23); apr_atomic_add(&y, 4); - if (apr_atomic_read(&y) != 27) { + if ((oldval = apr_atomic_read(&y)) != 27) { fprintf(stderr, "Failed\nAtomic Add doesn't add up ;( expected 27 got %d\n", oldval); |