From: Arnaldo Carvalho de Melo Date: Tue, 27 Jan 2026 04:15:47 +0000 (-0300) Subject: perf trace-event: Constify variables storing the result of strchr() on const tables X-Git-Tag: v7.0-rc1~16^2~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97b81df7225830c4db3c17ed1235d2f3eb613d3d;p=thirdparty%2Flinux.git 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 --- 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);