From: Mark Kettenis Date: Thu, 27 Dec 2001 15:37:35 +0000 (+0000) Subject: * maint.c (match_substring): Make parameters `string' and `substr' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=473e38f3467f314c1cadd0d816283d94c3727c2f;p=binutils-gdb.git * maint.c (match_substring): Make parameters `string' and `substr' const. Make local variable `tok' const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 94c7148a4e5..69fb886bcce 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 3e1b63f6765..2f85801fd92 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) {