summaryrefslogtreecommitdiff
path: root/test/testshm.c
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-11-06 03:13:42 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-11-06 03:13:42 +0000
commitfd11bb5f27a41a57511b443eb345bb61172d6eba (patch)
treebe0e87d767834df17d1dc2631bb3c2c2587ac08d /test/testshm.c
parentd1d7dfef9b0bbe1941c1c03c36c3d60901695c2c (diff)
downloadlibapr-fd11bb5f27a41a57511b443eb345bb61172d6eba.tar.gz
Axe another poor illustration, apr_shm_destroy preceeds apr_shm_remove
for portability. (As the comment hints, a non-portable alternative does exist). And be consistent in the use of @remark's --- although I suspect that we need to review @remarks and transition many to @warning. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@592235 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testshm.c')
-rw-r--r--test/testshm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/testshm.c b/test/testshm.c
index c660abf88..5e724005c 100644
--- a/test/testshm.c
+++ b/test/testshm.c
@@ -232,12 +232,6 @@ static void test_named_remove(abts_case *tc, void *data)
}
ABTS_PTR_NOTNULL(tc, shm);
- rv = apr_shm_remove(SHARED_FILENAME, p);
- APR_ASSERT_SUCCESS(tc, "Error removing shared memory block", rv);
- if (rv != APR_SUCCESS) {
- return ;
- }
-
rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
if (rv != APR_SUCCESS) {
@@ -247,6 +241,9 @@ static void test_named_remove(abts_case *tc, void *data)
rv = apr_shm_destroy(shm);
APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
+
+ rv = apr_shm_remove(SHARED_FILENAME, p);
+ APR_ASSERT_SUCCESS(tc, "Error removing shared memory block", rv);
}
#endif