From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751933AbbJFHNV (ORCPT ); Tue, 6 Oct 2015 03:13:21 -0400 Received: from terminus.zytor.com ([198.137.202.10]:55772 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbbJFHNU (ORCPT ); Tue, 6 Oct 2015 03:13:20 -0400 Date: Tue, 6 Oct 2015 00:12:47 -0700 From: tip-bot for Jiri Olsa Message-ID: 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 Reply-To: kan.liang@intel.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, acme@redhat.com, namhyung@kernel.org, tglx@linutronix.de, hpa@zytor.com, dsahern@gmail.com, a.p.zijlstra@chello.nl, dzickus@redhat.com, mingo@kernel.org In-Reply-To: <1444068369-20978-2-git-send-email-jolsa@kernel.org> References: <1444068369-20978-2-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib api fs: No need to use PATH_MAX + 1 Git-Commit-ID: ccb5597f9ba11b67b8aa8c6f4682675eceee0e21 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ccb5597f9ba11b67b8aa8c6f4682675eceee0e21 Gitweb: http://git.kernel.org/tip/ccb5597f9ba11b67b8aa8c6f4682675eceee0e21 Author: Jiri Olsa AuthorDate: Mon, 5 Oct 2015 20:06:01 +0200 Committer: Arnaldo Carvalho de Melo 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 Cc: David Ahern Cc: Don Zickus Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1444068369-20978-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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)