Return-Path: Delivered-To: apmail-apr-cvs-archive@www.apache.org Received: (qmail 1900 invoked from network); 14 Sep 2003 01:45:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Sep 2003 01:45:13 -0000 Received: (qmail 39734 invoked by uid 500); 14 Sep 2003 01:44:56 -0000 Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 39695 invoked by uid 500); 14 Sep 2003 01:44:55 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 39681 invoked from network); 14 Sep 2003 01:44:55 -0000 Date: 14 Sep 2003 01:45:12 -0000 Message-ID: <20030914014512.1882.qmail@minotaur.apache.org> From: brianp@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/test testatomic.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 #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);