From c848ec3d534f524f3a5c320d1dd739a11da7ed47 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 18 Sep 2019 15:23:29 +0200 Subject: [PATCH] tweaks: elide two multiplications with something that is always 1 --- src/nano.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nano.h b/src/nano.h index b3181834..689f3653 100644 --- 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