perf tools: remove xstrndup, xmalloc, xzalloc
All the functions that call this can handle the equivalent, non panic'ing wrapped routines. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -53,8 +53,8 @@ const char *perf_extract_argv0_path(const char *argv0)
|
||||
slash--;
|
||||
|
||||
if (slash >= argv0) {
|
||||
argv0_path = xstrndup(argv0, slash - argv0);
|
||||
return slash + 1;
|
||||
argv0_path = strndup(argv0, slash - argv0);
|
||||
return argv0_path ? slash + 1 : NULL;
|
||||
}
|
||||
|
||||
return argv0;
|
||||
|
Reference in New Issue
Block a user