1
1

in replace_regexp(), remove unnecessary casting of c to int

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2006-07-13 13:27:16 +00:00
родитель eec40df2a1
Коммит f968a18a3f
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -100,6 +100,9 @@ CVS code -
- nano.h: - nano.h:
- Remove the manual disabling of color support if regex.h isn't - Remove the manual disabling of color support if regex.h isn't
found, as configure.ac now handles that. (DLR) found, as configure.ac now handles that. (DLR)
- search.c:
replace_regexp()
- Remove unnecessary casting of c to int. (DLR)
- text.c: - text.c:
execute_command() execute_command()
- Remove the marking of the file as modified, as do_insertfile() - Remove the marking of the file as modified, as do_insertfile()

Просмотреть файл

@ -576,7 +576,7 @@ int replace_regexp(char *string, bool create)
/* Iterate through the replacement text to handle subexpression /* Iterate through the replacement text to handle subexpression
* replacement using \1, \2, \3, etc. */ * replacement using \1, \2, \3, etc. */
while (*c != '\0') { while (*c != '\0') {
int num = (int)(*(c + 1) - '0'); int num = (*(c + 1) - '0');
if (*c != '\\' || num < 1 || num > 9 || num > if (*c != '\\' || num < 1 || num > 9 || num >
search_regexp.re_nsub) { search_regexp.re_nsub) {