]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf trace-event: Constify variables storing the result of strchr() on const tables
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jan 2026 04:15:47 +0000 (01:15 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jan 2026 05:26:48 +0000 (02:26 -0300)
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>
tools/perf/util/trace-event-info.c

index c8755679281eb334c8cf0e98ffc3d9bf99cc72b9..45774722f249272f736926926d7b4211e769f9d4 100644 (file)
@@ -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);