OSDN Git Service

libparted: remove ped_realloc, now unused
authorJim Meyering <meyering@redhat.com>
Fri, 3 Feb 2012 15:11:53 +0000 (16:11 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 3 Feb 2012 15:44:36 +0000 (16:44 +0100)
* include/parted/parted.in.h (ped_realloc): Remove declaration.
* libparted/libparted.c (ped_realloc): Remove definition.

include/parted/parted.in.h
libparted/libparted.c
scripts/data/abi/baseline_symbols.txt

index fbcb9aa..856b7aa 100644 (file)
@@ -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
index 627bc82..a6d86f0 100644 (file)
@@ -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)
 {
index 010a55e..9162f1a 100644 (file)
@@ -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