nano

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

commit c848ec3d534f524f3a5c320d1dd739a11da7ed47
parent ab6390cad0e3ef5a9f1644b7eaf13d481d663e70
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 18 Sep 2019 15:23:29 +0200

tweaks: elide two multiplications with something that is always 1

Diffstat:
Msrc/nano.h | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nano.h b/src/nano.h @@ -59,9 +59,9 @@ #define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0) #define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag) -/* Macros for character allocation and more. */ -#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char)) -#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char)) +/* Macros for allocation of character strings. */ +#define charalloc(howmuch) (char *)nmalloc(howmuch) +#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, howmuch) /* In UTF-8 a character is at most six bytes long. */ #ifdef ENABLE_UTF8