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:26:48 +0300
commit97b81df7225830c4db3c17ed1235d2f3eb613d3d (patch)
treede92c1e16a74c38b508c0cf7ee49ce034fe8b948
parent0341eab66ba03a1f439db91f03bccd5b0a360842 (diff)
downloadlinux-97b81df7225830c4db3c17ed1235d2f3eb613d3d.tar.xz
perf trace-event: 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/trace-event-info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c
index c8755679281e..45774722f249 100644
--- a/tools/perf/util/trace-event-info.c
+++ b/tools/perf/util/trace-event-info.c
@@ -482,7 +482,7 @@ char *tracepoint_id_to_name(u64 config)
static struct tracepoint_path *tracepoint_name_to_path(const char *name)
{
struct tracepoint_path *path = zalloc(sizeof(*path));
- char *str = strchr(name, ':');
+ const char *str = strchr(name, ':');
if (path == NULL || str == NULL) {
free(path);