From 6669a78bee0de8928b29bc3e6cdca76d7c98d930 Mon Sep 17 00:00:00 2001 From: John Marino Date: Sat, 21 Jan 2012 11:52:42 +0100 Subject: [PATCH] rtld: Remove unused xrealloc function xrealloc was added back in the prebind support days, but wasn't removed when the resident executable support that replaced it arrived back in 2004. --- libexec/rtld-elf/rtld.h | 1 - libexec/rtld-elf/xmalloc.c | 17 +++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index e675cc0ad1..269971abbb 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -251,7 +251,6 @@ Obj_Entry *map_object(int, const char *, const struct stat *); void *xcalloc(size_t); void *xmalloc(size_t); char *xstrdup(const char *); -void *xrealloc(void *, size_t); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; void dump_relocations(Obj_Entry *); diff --git a/libexec/rtld-elf/xmalloc.c b/libexec/rtld-elf/xmalloc.c index 0f9276f723..561042f606 100644 --- a/libexec/rtld-elf/xmalloc.c +++ b/libexec/rtld-elf/xmalloc.c @@ -23,7 +23,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/libexec/rtld-elf/xmalloc.c,v 1.2 1999/08/28 00:10:11 peter Exp $ - * $DragonFly: src/libexec/rtld-elf/xmalloc.c,v 1.4 2005/03/30 00:56:02 joerg Exp $ */ #include @@ -31,10 +30,9 @@ #include #include -void *xcalloc(size_t); -void *xmalloc(size_t); -void *xrealloc(void *, size_t); -char *xstrdup(const char *); +void *xcalloc(size_t); +void *xmalloc(size_t); +char *xstrdup(const char *); void * xcalloc(size_t size) @@ -51,15 +49,6 @@ xmalloc(size_t size) return p; } -void * -xrealloc(void *cp, size_t nbytes) -{ - void *p = realloc(cp, nbytes); - if (p == NULL) - err(1, "Out of memory"); - return p; -} - char * xstrdup(const char *s) { -- 2.41.0