[PATCH v1 18/18] perf bpf-event: Constify variables storing the result of strchr() on const tables
From: Shreenidhi Shedi
Date: Sat May 09 2026 - 14:07:44 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
commit 8bf093acb3f1f07d846c86e32308f9f9954ed579 upstream
As newer glibcs will propagate the const attribute of the searched table
to its return.
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Shreenidhi Shedi <yesshedi@xxxxxxxxx>
---
tools/perf/util/bpf-event.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
index 91c7bfa82a50..fbaab3d3a476 100644
--- a/tools/perf/util/bpf-event.c
+++ b/tools/perf/util/bpf-event.c
@@ -411,7 +411,8 @@ kallsyms_process_symbol(void *data, const char *_name,
char type __maybe_unused, u64 start)
{
char disp[KSYM_NAME_LEN];
- char *module, *name;
+ const char *module;
+ char *name;
unsigned long id;
int err = 0;
--
2.54.0