summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/exec_cmd.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-18 23:54:30 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-19 04:05:28 +0200
commit151f85a471d29fc81f70348143d009a729901bc0 (patch)
tree5860102465e3fa3cf660884d91a82d86dbfc4835 /tools/perf/util/exec_cmd.c
parentperf probe: Don't call die() (diff)
downloadlinux-151f85a471d29fc81f70348143d009a729901bc0.tar.xz
linux-151f85a471d29fc81f70348143d009a729901bc0.zip
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>
Diffstat (limited to 'tools/perf/util/exec_cmd.c')
-rw-r--r--tools/perf/util/exec_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/exec_cmd.c b/tools/perf/util/exec_cmd.c
index c1b3d34e5716..67eeff571568 100644
--- a/tools/perf/util/exec_cmd.c
+++ b/tools/perf/util/exec_cmd.c
@@ -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;