perf demangle-java: 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:33:29 +0000 (02:33 -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/demangle-java.c

index ddf33d5..c3cb327 100644 (file)
@@ -158,7 +158,7 @@ char *
 java_demangle_sym(const char *str, int flags)
 {
        char *buf, *ptr;
-       char *p;
+       const char *p;
        size_t len, l1 = 0;
 
        if (!str)