commit beae2da10d8b2f6fc3546004d4c2c61cfef27854
parent 79c836b11b71433938dffbdda00d289a218d1af9
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 26 Jul 2017 14:47:51 -0500
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.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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)