nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f968a18a3f13135b3a8f0b7fc60814e7df1d01f0
parent eec40df2a17070c01002be47d677c0df22eed7ec
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Thu, 13 Jul 2006 13:27:16 +0000

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

Diffstat:
MChangeLog | 3+++
Msrc/search.c | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -100,6 +100,9 @@ CVS code - - nano.h: - Remove the manual disabling of color support if regex.h isn't found, as configure.ac now handles that. (DLR) +- search.c: + replace_regexp() + - Remove unnecessary casting of c to int. (DLR) - text.c: execute_command() - Remove the marking of the file as modified, as do_insertfile() diff --git a/src/search.c b/src/search.c @@ -576,7 +576,7 @@ int replace_regexp(char *string, bool create) /* Iterate through the replacement text to handle subexpression * replacement using \1, \2, \3, etc. */ while (*c != '\0') { - int num = (int)(*(c + 1) - '0'); + int num = (*(c + 1) - '0'); if (*c != '\\' || num < 1 || num > 9 || num > search_regexp.re_nsub) {