* maint.c (match_substring): Make parameters string' and substr'

const.  Make local variable `tok' const.
This commit is contained in:
Mark Kettenis 2001-12-27 15:37:35 +00:00
parent 96297dabb3
commit 473e38f346
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-12-27 Mark Kettenis <kettenis@gnu.org>
* maint.c (match_substring): Make parameters `string' and `substr'
const. Make local variable `tok' const.
2001-12-27 Mark Kettenis <kettenis@gnu.org> 2001-12-27 Mark Kettenis <kettenis@gnu.org>
* config/i386/tm-i386.h (FP7_REGNUM, FIRST_FPU_CTRL_REGNUM, * config/i386/tm-i386.h (FP7_REGNUM, FIRST_FPU_CTRL_REGNUM,

View File

@ -189,10 +189,10 @@ maintenance_info_command (char *arg, int from_tty)
/* Mini tokenizing lexer for 'maint info sections' command. */ /* Mini tokenizing lexer for 'maint info sections' command. */
static int static int
match_substring (char *string, char *substr) match_substring (const char *string, const char *substr)
{ {
int substr_len = strlen(substr); int substr_len = strlen(substr);
char *tok; const char *tok;
while ((tok = strstr (string, substr)) != NULL) while ((tok = strstr (string, substr)) != NULL)
{ {