patch 8.1.1414: alloc() returning "char_u *" causes a lot of type casts
Problem: Alloc() returning "char_u *" causes a lot of type casts.
Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to
check the simple allocations.
diff --git a/src/change.c b/src/change.c
index 0873dd3..11f4b0a 100644
--- a/src/change.c
+++ b/src/change.c
@@ -286,7 +286,7 @@
return;
}
- lnr = (listener_T *)alloc_clear(sizeof(listener_T));
+ lnr = ALLOC_CLEAR_ONE(listener_T);
if (lnr == NULL)
{
free_callback(callback, partial);