]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf disasm: Constify variables storing the result of bsearch() 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 04:44:21 +0000 (01:44 -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/disasm.c

index 6b36287f30feec6f3d0641740e8d0f1fe50e1465..ddcc488f2e5f0e5ce10dca8f98d60b8dc4b42fe8 100644 (file)
@@ -761,7 +761,7 @@ static void ins__sort(struct arch *arch)
 static const struct ins_ops *__ins__find(const struct arch *arch, const char *name,
                                     struct disasm_line *dl)
 {
-       struct ins *ins;
+       const struct ins *ins;
        const int nmemb = arch->nr_instructions;
 
        if (arch__is_powerpc(arch)) {