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/if_perlsfio.c b/src/if_perlsfio.c
index 31f0c6b..f636e26 100644
--- a/src/if_perlsfio.c
+++ b/src/if_perlsfio.c
@@ -51,7 +51,7 @@
{
Sfdisc_t *disc;
- disc = (Sfdisc_t *)alloc(sizeof(Sfdisc_t));
+ disc = ALLOC_ONE(Sfdisc_t);
if (disc == NULL)
return NULL;