perf tools: Remove unused perf_pathdup, xstrdup functions
Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-s87zi5d03m6rz622y1z6rlsa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -12,18 +12,6 @@ static inline void release_pack_memory(size_t size __maybe_unused,
|
||||
{
|
||||
}
|
||||
|
||||
char *xstrdup(const char *str)
|
||||
{
|
||||
char *ret = strdup(str);
|
||||
if (!ret) {
|
||||
release_pack_memory(strlen(str) + 1, -1);
|
||||
ret = strdup(str);
|
||||
if (!ret)
|
||||
die("Out of memory, strdup failed");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *xrealloc(void *ptr, size_t size)
|
||||
{
|
||||
void *ret = realloc(ptr, size);
|
||||
|
Reference in New Issue
Block a user