bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libparted: remove ped_realloc, now unused


From: Jim Meyering
Subject: [PATCH] libparted: remove ped_realloc, now unused
Date: Fri, 03 Feb 2012 16:14:01 +0100

FYI,

>From c3ca221cbefdf0ff54e7ed25ccf2d202f6c1761c Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 3 Feb 2012 16:11:53 +0100
Subject: [PATCH] libparted: remove ped_realloc, now unused

* include/parted/parted.in.h (ped_realloc): Remove declaration.
* libparted/libparted.c (ped_realloc): Remove definition.
---
 include/parted/parted.in.h            |    1 -
 libparted/libparted.c                 |   15 ---------------
 scripts/data/abi/baseline_symbols.txt |    1 -
 3 files changed, 0 insertions(+), 17 deletions(-)

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
--
1.7.9.112.gb85f2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]