Add xmalloc_failed() function to common-utils.c in to avoid the need to link in libiberty's xmalloc code.

This commit is contained in:
Nick Clifton 2016-06-01 11:44:08 +01:00
parent e3b5daf9f7
commit 51403f74d9
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-06-01 Nick Clifton <nickc@redhat.com>
* common/common-utils.c (xmalloc_failed): New function. Provided
so that the version in libiberty is not linked in.
2016-06-01 Markus Metzger <markus.t.metzger@intel.com>
* infcmd.c (skip_finish_frames): New.

View File

@ -100,6 +100,12 @@ xfree (void *ptr)
free (ptr); /* ARI: free */
}
void
xmalloc_failed (size_t size)
{
malloc_failure (size);
}
/* Like asprintf/vasprintf but get an internal_error if the call
fails. */