You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jw...@apache.org on 2001/03/01 05:59:09 UTC
cvs commit: apr-util/buckets apr_buckets_file.c apr_buckets_heap.c apr_buckets_mmap.c
jwoolley 01/02/28 20:59:09
Modified: buckets apr_buckets_file.c apr_buckets_heap.c
apr_buckets_mmap.c
Log:
The destroy function for shared bucket types should not interchange
the use of a local variable and the 'void *data' parameter. It works,
since the two are equivalent, but it's confusing to look at. Where
possible, the local variable is removed entirely. Some bucket types
have to dereference the pointer to free private data, though, so in
those cases the local variable remains but it is now used consistently.
Submitted by: Greg Stein
Revision Changes Path
1.39 +1 -3 apr-util/buckets/apr_buckets_file.c
Index: apr_buckets_file.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -u -r1.38 -r1.39
--- apr_buckets_file.c 2001/02/28 17:52:42 1.38
+++ apr_buckets_file.c 2001/03/01 04:59:06 1.39
@@ -86,10 +86,8 @@
static void file_destroy(void *data)
{
- apr_bucket_file *f = data;
-
if (apr_bucket_shared_destroy(data)) {
- free(f);
+ free(data);
}
}
1.30 +1 -1 apr-util/buckets/apr_buckets_heap.c
Index: apr_buckets_heap.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_heap.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -u -r1.29 -r1.30
--- apr_buckets_heap.c 2001/02/28 17:52:43 1.29
+++ apr_buckets_heap.c 2001/03/01 04:59:07 1.30
@@ -72,7 +72,7 @@
{
apr_bucket_heap *h = data;
- if (apr_bucket_shared_destroy(data)) {
+ if (apr_bucket_shared_destroy(h)) {
free(h->base);
free(h);
}
1.33 +1 -1 apr-util/buckets/apr_buckets_mmap.c
Index: apr_buckets_mmap.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_mmap.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -u -r1.32 -r1.33
--- apr_buckets_mmap.c 2001/02/28 19:37:47 1.32
+++ apr_buckets_mmap.c 2001/03/01 04:59:07 1.33
@@ -78,7 +78,7 @@
{
apr_bucket_mmap *m = data;
- if (apr_bucket_shared_destroy(data)) {
+ if (apr_bucket_shared_destroy(m)) {
/* XXX: apr_mmap_delete(m->mmap)? */
free(m);
}