From 5eafdf0f9bfd9a3c5f93414ac16bb399b6da0b7f Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 24 Sep 2015 15:42:30 -0700 Subject: Move files up to match upstream source structure. To create an upstream-master branch later and keep track of upstream changes. * src/Android.mk file is deleted because ./Android.mk is identical and serves the same purpose. * ./Makefile.am is moved from old src/Makefile.am, and new src/Makefile.am is from old src/src/Makefile.am. Similarly, ./ChangeLog is moved from old src/ChangeLog, and new src/ChangeLog is from old src/src/ChangeLog. * Remove unnecessary files that were generated by autoconf or configure. Change-Id: Iafc67d1e80f9d7ad2a74bc851bf9ca9e87205336 --- src/lib/xmalloc.c | 84 ------------------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 src/lib/xmalloc.c (limited to 'src/lib/xmalloc.c') diff --git a/src/lib/xmalloc.c b/src/lib/xmalloc.c deleted file mode 100644 index 27ccab95..00000000 --- a/src/lib/xmalloc.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Convenience functions for allocation. - Copyright (C) 2006 Red Hat, Inc. - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify - it under the terms of either - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at - your option) any later version - - or - - * the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at - your option) any later version - - or both in parallel, as here. - - elfutils is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received copies of the GNU General Public License and - the GNU Lesser General Public License along with this program. If - not, see . */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include "system.h" - -#ifndef _ -# define _(str) gettext (str) -#endif - - -/* Allocate N bytes of memory dynamically, with error checking. */ -void * -xmalloc (n) - size_t n; -{ - void *p; - - p = malloc (n); - if (p == NULL) - error (EXIT_FAILURE, 0, _("memory exhausted")); - return p; -} - - -/* Allocate memory for N elements of S bytes, with error checking. */ -void * -xcalloc (n, s) - size_t n, s; -{ - void *p; - - p = calloc (n, s); - if (p == NULL) - error (EXIT_FAILURE, 0, _("memory exhausted")); - return p; -} - - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. */ -void * -xrealloc (p, n) - void *p; - size_t n; -{ - p = realloc (p, n); - if (p == NULL) - error (EXIT_FAILURE, 0, _("memory exhausted")); - return p; -} -- cgit v1.2.3