diff options
author | Theodore Ts'o <tytso@mit.edu> | 2003-08-01 09:41:07 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2003-08-01 09:41:07 -0400 |
commit | c4e3d3f374b409500e3dd05c0b0eca6ac98a6b4e (patch) | |
tree | 2d1db6d042abcaf015834480ea1ca8c26c456f5d /e2fsck/ea_refcount.c | |
parent | 0ec1b153ba6291aac5faa00c197a71d1cb0165f5 (diff) | |
download | e2fsprogs-c4e3d3f374b409500e3dd05c0b0eca6ac98a6b4e.tar.gz |
ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem()
all now take a 'void *' instead of a 'void **' in order to
avoid pointer aliasing problems with GCC 3.x.
Diffstat (limited to 'e2fsck/ea_refcount.c')
-rw-r--r-- | e2fsck/ea_refcount.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/e2fsck/ea_refcount.c b/e2fsck/ea_refcount.c index 04ba47c5..de13316e 100644 --- a/e2fsck/ea_refcount.c +++ b/e2fsck/ea_refcount.c @@ -38,8 +38,8 @@ void ea_refcount_free(ext2_refcount_t refcount) return; if (refcount->list) - ext2fs_free_mem((void **) &refcount->list); - ext2fs_free_mem((void **) &refcount); + ext2fs_free_mem(&refcount->list); + ext2fs_free_mem(&refcount); } errcode_t ea_refcount_create(int size, ext2_refcount_t *ret) @@ -48,8 +48,7 @@ errcode_t ea_refcount_create(int size, ext2_refcount_t *ret) errcode_t retval; size_t bytes; - retval = ext2fs_get_mem(sizeof(struct ea_refcount), - (void **) &refcount); + retval = ext2fs_get_mem(sizeof(struct ea_refcount), &refcount); if (retval) return retval; memset(refcount, 0, sizeof(struct ea_refcount)); @@ -62,7 +61,7 @@ errcode_t ea_refcount_create(int size, ext2_refcount_t *ret) printf("Refcount allocated %d entries, %d bytes.\n", refcount->size, bytes); #endif - retval = ext2fs_get_mem(bytes, (void **) &refcount->list); + retval = ext2fs_get_mem(bytes, &refcount->list); if (retval) goto errout; memset(refcount->list, 0, bytes); @@ -124,7 +123,7 @@ static struct ea_refcount_el *insert_refcount_el(ext2_refcount_t refcount, sizeof(struct ea_refcount_el), (size_t) new_size * sizeof(struct ea_refcount_el), - (void **) &refcount->list); + &refcount->list); if (retval) return 0; refcount->size = new_size; |