linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: kan.liang@intel.com, namhyung@kernel.org, acme@redhat.com,
	jolsa@kernel.org, linux-kernel@vger.kernel.org,
	a.p.zijlstra@chello.nl, dsahern@gmail.com, tglx@linutronix.de,
	hpa@zytor.com, dzickus@redhat.com, mingo@kernel.org
Subject: [tip:perf/core] tools lib api fs: No need to use PATH_MAX + 1
Date: Tue, 6 Oct 2015 00:12:47 -0700	[thread overview]
Message-ID: <tip-ccb5597f9ba11b67b8aa8c6f4682675eceee0e21@git.kernel.org> (raw)
In-Reply-To: <1444068369-20978-2-git-send-email-jolsa@kernel.org>

Commit-ID:  ccb5597f9ba11b67b8aa8c6f4682675eceee0e21
Gitweb:     http://git.kernel.org/tip/ccb5597f9ba11b67b8aa8c6f4682675eceee0e21
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 5 Oct 2015 20:06:01 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 5 Oct 2015 16:12:09 -0300

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>
---
 tools/lib/api/fs/fs.c           | 2 +-
 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 732dbef5..459599d 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[] = {
 struct fs {
 	const char		*name;
 	const char * const	*mounts;
-	char			 path[PATH_MAX + 1];
+	char			 path[PATH_MAX];
 	bool			 found;
 	long			 magic;
 };
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 0406a7d..a26bb5e 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -12,9 +12,9 @@
 #include "tracing_path.h"
 
 
-char tracing_mnt[PATH_MAX + 1]         = "/sys/kernel/debug";
-char tracing_path[PATH_MAX + 1]        = "/sys/kernel/debug/tracing";
-char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events";
+char tracing_mnt[PATH_MAX]         = "/sys/kernel/debug";
+char tracing_path[PATH_MAX]        = "/sys/kernel/debug/tracing";
+char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events";
 
 
 static void __tracing_path_set(const char *tracing, const char *mountpoint)

  reply	other threads:[~2015-10-06  7:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 18:06 [PATCH 0/9] perf tools: Various fixes Jiri Olsa
2015-10-05 18:06 ` [PATCH 1/9] tools lib api fs: Do not use PATH_MAX + 1 Jiri Olsa
2015-10-06  7:12   ` tip-bot for Jiri Olsa [this message]
2015-10-05 18:06 ` [PATCH 2/9] perf evlist: Display DATA_SRC sample type bit Jiri Olsa
2015-10-06  7:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 3/9] perf annotate: Fix sizeof_sym_hist overflow issue Jiri Olsa
2015-10-06  7:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 4/9] perf tools: Make perf_event_attr__set_max_precise_ip global Jiri Olsa
2015-10-06  7:13   ` [tip:perf/core] perf tools: Export perf_event_attr__set_max_precise_ip() tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 5/9] perf tools: Introduce 'P' modifier Jiri Olsa
2015-10-05 18:13   ` David Ahern
2015-10-05 18:38     ` Jiri Olsa
2015-10-05 19:08       ` Arnaldo Carvalho de Melo
2015-10-05 19:20   ` Arnaldo Carvalho de Melo
2015-10-06  7:01     ` Jiri Olsa
2015-10-06  7:14   ` [tip:perf/core] perf tools: Introduce 'P' modifier to request max precision tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 6/9] perf tests: Add parsing test for 'P' modifier Jiri Olsa
2015-10-06  7:14   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 7/9] perf tools: Add support for sorting on the iaddr Jiri Olsa
2015-10-06  7:14   ` [tip:perf/core] " tip-bot for Don Zickus
2015-10-05 18:06 ` [PATCH 8/9] perf tools: Setup proper width for symbol_iaddr field Jiri Olsa
2015-10-06  7:15   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-05 18:06 ` [PATCH 9/9] perf tools: Handle -h and -v options Jiri Olsa
2015-10-06  7:15   ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-ccb5597f9ba11b67b8aa8c6f4682675eceee0e21@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=dzickus@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).