diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-01-27 07:15:47 +0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-01-27 08:28:33 +0300 |
| commit | 0e14cb3b24f8f301cf6490a4493afc98321ed5bb (patch) | |
| tree | 99ccfd0f399c8df1d0c44e1aadbaeb1f66df717f | |
| parent | 97b81df7225830c4db3c17ed1235d2f3eb613d3d (diff) | |
| download | linux-0e14cb3b24f8f301cf6490a4493afc98321ed5bb.tar.xz | |
perf units: 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>
| -rw-r--r-- | tools/perf/util/units.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/units.c b/tools/perf/util/units.c index 4c6a86e1cb54..0bbacf5a29aa 100644 --- a/tools/perf/util/units.c +++ b/tools/perf/util/units.c @@ -12,7 +12,7 @@ unsigned long parse_tag_value(const char *str, struct parse_tag *tags) struct parse_tag *i = tags; while (i->tag) { - char *s = strchr(str, i->tag); + const char *s = strchr(str, i->tag); if (s) { unsigned long int value; |
