summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-10-26 17:46:53 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-11-12 20:49:08 +0100
commitc65d4e35dcdebc21d80c440944c11e1067743a8f (patch)
treee57740aaff7136d804e17e9737fa7dc4a393409e /perf
parent6dfb12c7d7c4ada716c86dbb9af3446d9880ed36 (diff)
downloadcairo-c65d4e35dcdebc21d80c440944c11e1067743a8f.tar.gz
Use xstrdup instead of xmalloc when possible
Don't open code xstrdup, just use it.
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-report.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/perf/cairo-perf-report.c b/perf/cairo-perf-report.c
index 8df78c647..38bdc0cd4 100644
--- a/perf/cairo-perf-report.c
+++ b/perf/cairo-perf-report.c
@@ -388,11 +388,9 @@ cairo_perf_report_load (cairo_perf_report_t *report,
if (name == NULL)
name = "stdin";
- configuration = xmalloc (strlen (name) * sizeof (char) + 1);
- strcpy (configuration, name);
+ configuration = xstrdup (name);
baseName = basename (configuration);
- report->configuration = xmalloc (strlen (baseName) * sizeof (char) + 1);
- strcpy (report->configuration, baseName);
+ report->configuration = xstrdup (baseName);
free (configuration);
dot = strrchr (report->configuration, '.');