diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 08:37:17 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 08:37:17 +0000 |
commit | 2137b4cca9af2ca22b527ef9f3835c532511453d (patch) | |
tree | b758c587161d84c6c2b535f2fdedc48039282170 /block-vvfat.c | |
parent | bf6bca527c11dff117990acdeb8cb425e985788a (diff) |
Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vvfat.c')
-rw-r--r-- | block-vvfat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block-vvfat.c b/block-vvfat.c index 9394fbd69c..6de76c6d0a 100644 --- a/block-vvfat.c +++ b/block-vvfat.c @@ -101,7 +101,7 @@ static inline int array_ensure_allocated(array_t* array, int index) { if((index + 1) * array->item_size > array->size) { int new_size = (index + 32) * array->item_size; - array->pointer = realloc(array->pointer, new_size); + array->pointer = qemu_realloc(array->pointer, new_size); if (!array->pointer) return -1; array->size = new_size; @@ -127,7 +127,7 @@ static inline void* array_get_next(array_t* array) { static inline void* array_insert(array_t* array,unsigned int index,unsigned int count) { if((array->next+count)*array->item_size>array->size) { int increment=count*array->item_size; - array->pointer=realloc(array->pointer,array->size+increment); + array->pointer=qemu_realloc(array->pointer,array->size+increment); if(!array->pointer) return 0; array->size+=increment; |