summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-01-27 07:15:47 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-01-27 08:31:29 +0300
commit21c0bc9144834e39762dd6fddbb255ebb80cf079 (patch)
tree5a7a142b622609bfbb3666faa52168167d10521e
parent0e14cb3b24f8f301cf6490a4493afc98321ed5bb (diff)
downloadlinux-21c0bc9144834e39762dd6fddbb255ebb80cf079.tar.xz
perf time-utils: Constify variables storing the result of strchr() on const tables
As newer glibcs will propagate the const attribute of the searched table to its return. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/time-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c
index 1b91ccd4d523..d43c4577d7eb 100644
--- a/tools/perf/util/time-utils.c
+++ b/tools/perf/util/time-utils.c
@@ -325,7 +325,7 @@ static int percent_comma_split(struct perf_time_interval *ptime_buf, int num,
}
static int one_percent_convert(struct perf_time_interval *ptime_buf,
- const char *ostr, u64 start, u64 end, char *c)
+ const char *ostr, u64 start, u64 end, const char *c)
{
char *str;
int len = strlen(ostr), ret;
@@ -358,7 +358,7 @@ static int one_percent_convert(struct perf_time_interval *ptime_buf,
int perf_time__percent_parse_str(struct perf_time_interval *ptime_buf, int num,
const char *ostr, u64 start, u64 end)
{
- char *c;
+ const char *c;
/*
* ostr example: