summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/session.c2
-rw-r--r--tools/perf/util/session.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index d9318d8a9ba1..ea17dfb85baa 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -107,7 +107,7 @@ struct perf_session *perf_session__new(const char *filename, int mode,
bool force, bool repipe,
struct perf_tool *tool)
{
- size_t len = filename ? strlen(filename) + 1 : 0;
+ size_t len = filename ? strlen(filename) : 0;
struct perf_session *self = zalloc(sizeof(*self) + len);
if (self == NULL)
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index fb696124ad61..37bc38381fb6 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -50,7 +50,7 @@ struct perf_session {
int cwdlen;
char *cwd;
struct ordered_samples ordered_samples;
- char filename[0];
+ char filename[1];
};
struct perf_tool;