This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Cleanup: Constify parameter for linespec_parse_line_offset
- From: Keith Seitz <keiths at redhat dot com>
- To: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Tue, 17 Jul 2012 14:28:38 -0700
- Subject: [RFA] Cleanup: Constify parameter for linespec_parse_line_offset
Hi,
The following trivial patch does makes the parameter for
linespec_parse_line_offset const char*.
Ok?
Keith
ChangeLog
2012-07-17 Keith Seitz <keiths@redhat.com>
* linespec.c (linespec_parse_line_offset): Make parameter
const.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 4156694..e5c1f9f 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1420,7 +1420,7 @@ unexpected_linespec_error (linespec_parser *parser)
/* Parse and return a line offset in STRING. */
static struct line_offset
-linespec_parse_line_offset (char *string)
+linespec_parse_line_offset (const char *string)
{
struct line_offset line_offset = {0, LINE_OFFSET_NONE};