[6/8] Constify tfile_interp_line

Message ID 20230709-trace-cleanups-v1-6-c410e1072fab@tromey.com
State New
Headers
Series Minor C++-ification and cleanup in trace targets |

Commit Message

Tom Tromey July 9, 2023, 5:01 p.m. UTC
  This adds 'const' to tfile_interp_line.
---
 gdb/tracefile-tfile.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index d3304b0b355..59055e7ea1a 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -424,7 +424,7 @@  int trace_regblock_size;
 static std::string trace_tdesc;
 
 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_tsv **utsvp);
 
@@ -574,15 +574,15 @@  tfile_target_open (const char *arg, int from_tty)
    file.  */
 
 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)
 {
-  char *p = line;
+  const char *p = line;
 
   if (startswith (p, "R "))
     {
       p += strlen ("R ");
-      trace_regblock_size = strtol (p, &p, 16);
+      trace_regblock_size = strtol (p, nullptr, 16);
     }
   else if (startswith (p, "status "))
     {