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>
This commit is contained in:
Arnaldo Carvalho de Melo 2026-01-27 01:15:47 -03:00
parent 0341eab66b
commit 97b81df722

View 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);