Constify tfile_interp_line

This adds 'const' to tfile_interp_line.

Reviewed-by: Keith Seitz <keiths@redhat.com>
This commit is contained in:
Tom Tromey 2023-07-09 09:00:42 -06:00
parent ebd4fd0a4f
commit d3a05ac895

View File

@ -424,7 +424,7 @@ int trace_regblock_size;
static std::string trace_tdesc; static std::string trace_tdesc;
static void tfile_append_tdesc_line (const char *line); static void tfile_append_tdesc_line (const char *line);
static void tfile_interp_line (char *line, static void tfile_interp_line (const char *line,
struct uploaded_tp **utpp, struct uploaded_tp **utpp,
struct uploaded_tsv **utsvp); struct uploaded_tsv **utsvp);
@ -574,15 +574,15 @@ tfile_target_open (const char *arg, int from_tty)
file. */ file. */
static void static void
tfile_interp_line (char *line, struct uploaded_tp **utpp, tfile_interp_line (const char *line, struct uploaded_tp **utpp,
struct uploaded_tsv **utsvp) struct uploaded_tsv **utsvp)
{ {
char *p = line; const char *p = line;
if (startswith (p, "R ")) if (startswith (p, "R "))
{ {
p += strlen ("R "); p += strlen ("R ");
trace_regblock_size = strtol (p, &p, 16); trace_regblock_size = strtol (p, nullptr, 16);
} }
else if (startswith (p, "status ")) else if (startswith (p, "status "))
{ {