From 473e38f3467f314c1cadd0d816283d94c3727c2f Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 27 Dec 2001 15:37:35 +0000 Subject: [PATCH] * maint.c (match_substring): Make parameters `string' and `substr' const. Make local variable `tok' const. --- gdb/ChangeLog | 5 +++++ gdb/maint.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 94c7148a4e..69fb886bcc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-12-27 Mark Kettenis + + * maint.c (match_substring): Make parameters `string' and `substr' + const. Make local variable `tok' const. + 2001-12-27 Mark Kettenis * config/i386/tm-i386.h (FP7_REGNUM, FIRST_FPU_CTRL_REGNUM, diff --git a/gdb/maint.c b/gdb/maint.c index 3e1b63f676..2f85801fd9 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -189,10 +189,10 @@ maintenance_info_command (char *arg, int from_tty) /* Mini tokenizing lexer for 'maint info sections' command. */ static int -match_substring (char *string, char *substr) +match_substring (const char *string, const char *substr) { int substr_len = strlen(substr); - char *tok; + const char *tok; while ((tok = strstr (string, substr)) != NULL) {