You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2004/03/13 01:33:24 UTC

cvs commit: apr/test testatomic.c

rbb         2004/03/12 16:33:24

  Modified:    test     testatomic.c
  Log:
  Declare variables at the beginning of functions, I'm surprised this
  actually compiled on Linux.
  
  Revision  Changes    Path
  1.41      +4 -2      apr/test/testatomic.c
  
  Index: testatomic.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testatomic.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- testatomic.c	13 Mar 2004 00:28:45 -0000	1.40
  +++ testatomic.c	13 Mar 2004 00:33:24 -0000	1.41
  @@ -149,12 +149,13 @@
       apr_uint32_t y32;
       apr_uint32_t rv;
       apr_uint32_t minus1 = -1;
  +    char *str;
   
       apr_atomic_set32(&y32, 0);
       rv = apr_atomic_dec32(&y32);
   
       CuAssert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0);
  -    char *str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);
  +    str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);
       CuAssert(tc, str, y32 == minus1);
   }
   
  @@ -163,11 +164,12 @@
       apr_uint32_t y32 = -1;
       apr_uint32_t minus1 = -1;
       apr_uint32_t rv;
  +    char *str;
   
       rv = apr_atomic_inc32(&y32);
   
       CuAssert(tc, "apr_atomic_dec32 on zero returned zero.", rv == minus1);
  -    char *str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
  +    str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
       CuAssert(tc, str, y32 == 0);
   }