mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
perf tp_pmu: Address const-correctness errors in recent glibcs
To avoid having more variables, just cast the const variable searched to non-const since the result will not be modified, its only later that that variable will be used to modify something, but then its non-const memory being modified, so using a cast is the cheapest thing here. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -192,7 +192,7 @@ bool tp_pmu__have_event(struct perf_pmu *pmu __maybe_unused, const char *name)
|
||||
char *dup_name, *colon;
|
||||
int id;
|
||||
|
||||
colon = strchr(name, ':');
|
||||
colon = strchr((char *)name, ':');
|
||||
if (colon == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user