You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by br...@apache.org on 2003/09/14 03:45:12 UTC
cvs commit: apr/test testatomic.c
brianp 2003/09/13 18:45:12
Modified: test testatomic.c
Log:
fix error message in add test
Revision Changes Path
1.24 +6 -1 apr/test/testatomic.c
Index: testatomic.c
===================================================================
RCS file: /home/cvs/apr/test/testatomic.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- testatomic.c 1 Jan 2003 00:01:56 -0000 1.23
+++ testatomic.c 14 Sep 2003 01:45:12 -0000 1.24
@@ -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 @@
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);