diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-10-05 14:06:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-10-05 15:12:09 -0400 |
commit | ccb5597f9ba11b67b8aa8c6f4682675eceee0e21 (patch) | |
tree | 3f6325507b36819074fe7d7d29cba2e24a13081b /tools/lib | |
parent | e3b0ac1b7a8a590440a2030e7d10d48c59ab8a2a (diff) |
tools lib api fs: No need to use PATH_MAX + 1
Because there's no point, PATH_MAX is big enough.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1444068369-20978-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/api/fs/fs.c | 2 | ||||
-rw-r--r-- | tools/lib/api/fs/tracing_path.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c index 732dbef588b0..459599d1b6c4 100644 --- a/tools/lib/api/fs/fs.c +++ b/tools/lib/api/fs/fs.c | |||
@@ -69,7 +69,7 @@ static const char * const tracefs__known_mountpoints[] = { | |||
69 | struct fs { | 69 | struct fs { |
70 | const char *name; | 70 | const char *name; |
71 | const char * const *mounts; | 71 | const char * const *mounts; |
72 | char path[PATH_MAX + 1]; | 72 | char path[PATH_MAX]; |
73 | bool found; | 73 | bool found; |
74 | long magic; | 74 | long magic; |
75 | }; | 75 | }; |
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c index 0406a7d5c891..a26bb5ea8283 100644 --- a/tools/lib/api/fs/tracing_path.c +++ b/tools/lib/api/fs/tracing_path.c | |||
@@ -12,9 +12,9 @@ | |||
12 | #include "tracing_path.h" | 12 | #include "tracing_path.h" |
13 | 13 | ||
14 | 14 | ||
15 | char tracing_mnt[PATH_MAX + 1] = "/sys/kernel/debug"; | 15 | char tracing_mnt[PATH_MAX] = "/sys/kernel/debug"; |
16 | char tracing_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing"; | 16 | char tracing_path[PATH_MAX] = "/sys/kernel/debug/tracing"; |
17 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; | 17 | char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events"; |
18 | 18 | ||
19 | 19 | ||
20 | static void __tracing_path_set(const char *tracing, const char *mountpoint) | 20 | static void __tracing_path_set(const char *tracing, const char *mountpoint) |