apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: apr/test testatomic.c
Date Sun, 14 Sep 2003 01:45:12 GMT
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);
  
  
  

Mime
View raw message