From: Jim Meyering Date: Fri, 3 Feb 2012 15:11:53 +0000 (+0100) Subject: libparted: remove ped_realloc, now unused X-Git-Tag: android-x86-4.4-r1~30 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f1c2c13374c6cd2448f4d9d38d101d80b169dfb9;p=android-x86%2Fexternal-parted.git libparted: remove ped_realloc, now unused * include/parted/parted.in.h (ped_realloc): Remove declaration. * libparted/libparted.c (ped_realloc): Remove definition. --- diff --git a/include/parted/parted.in.h b/include/parted/parted.in.h index fbcb9aa..856b7aa 100644 --- a/include/parted/parted.in.h +++ b/include/parted/parted.in.h @@ -47,7 +47,6 @@ extern const char *ped_get_version () _GL_ATTRIBUTE_CONST; extern void* ped_malloc (size_t size); extern void* ped_calloc (size_t size); -extern int ped_realloc (void** ptr, size_t size); extern void free (void* ptr); #ifdef __cplusplus diff --git a/libparted/libparted.c b/libparted/libparted.c index 627bc82..a6d86f0 100644 --- a/libparted/libparted.c +++ b/libparted/libparted.c @@ -234,21 +234,6 @@ ped_malloc (size_t size) return mem; } -int -ped_realloc (void** old, size_t size) -{ - void* mem; - - mem = (void*) realloc (*old, size); - if (!mem) { - ped_exception_throw (PED_EXCEPTION_FATAL, PED_EXCEPTION_CANCEL, - _("Out of memory.")); - return 0; - } - *old = mem; - return 1; -} - void* ped_calloc (size_t size) { diff --git a/scripts/data/abi/baseline_symbols.txt b/scripts/data/abi/baseline_symbols.txt index 010a55e..9162f1a 100644 --- a/scripts/data/abi/baseline_symbols.txt +++ b/scripts/data/abi/baseline_symbols.txt @@ -381,7 +381,6 @@ FUNC:ped_partition_set_flag FUNC:ped_partition_set_name FUNC:ped_partition_set_system FUNC:ped_partition_type_get_name -FUNC:ped_realloc FUNC:ped_register_disk_type FUNC:ped_round_down_to FUNC:ped_round_to_nearest