From beae2da10d8b2f6fc3546004d4c2c61cfef27854 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 26 Jul 2017 14:47:51 -0500 Subject: [PATCH] weeding: remove redundant casts of nmalloc() A cast on the same line as a variable declaration is superfluous, because it effectively defines the type of the variable twice. --- src/global.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/global.c b/src/global.c index 03e8561d..ca2049c6 100644 --- a/src/global.c +++ b/src/global.c @@ -313,7 +313,7 @@ void discard_buffer(void) void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *help, bool blank_after, bool viewok) { - subnfunc *f = (subnfunc *)nmalloc(sizeof(subnfunc)); + subnfunc *f = nmalloc(sizeof(subnfunc)); if (allfuncs == NULL) allfuncs = f; @@ -344,7 +344,7 @@ void add_to_sclist(int menus, const char *scstring, const int keycode, #ifndef NANO_TINY static int counter = 0; #endif - sc *s = (sc *)nmalloc(sizeof(sc)); + sc *s = nmalloc(sizeof(sc)); /* Start the list, or tack on the next item. */ if (sclist == NULL)