nano

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

commit 787dca6724dced8c9f43e199a3ee469b21edbfe8
parent 15e36956b5ee2b87fee2b2a2651704641b60399f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 10 Jun 2019 12:06:12 +0200

tweaks: elide an unneeded variable

Diffstat:
Msrc/chars.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/chars.c b/src/chars.c @@ -541,7 +541,6 @@ char *mbstrchr(const char *s, const char *c) #ifdef ENABLE_UTF8 if (use_utf8) { bool bad_s_mb = FALSE, bad_c_mb = FALSE; - const char *q = s; wchar_t ws, wc; if (mbtowc(&wc, c, MAXCHARLEN) < 0) { @@ -561,13 +560,12 @@ char *mbstrchr(const char *s, const char *c) break; s += sym_len; - q += sym_len; } if (*s == '\0') - q = NULL; + return NULL; - return (char *)q; + return (char *)s; } else #endif return (char *)strchr(s, *c);