mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
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.
This commit is contained in:
@@ -51,7 +51,7 @@ sfdcnewvim(void)
|
||||
{
|
||||
Sfdisc_t *disc;
|
||||
|
||||
disc = (Sfdisc_t *)alloc(sizeof(Sfdisc_t));
|
||||
disc = ALLOC_ONE(Sfdisc_t);
|
||||
if (disc == NULL)
|
||||
return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user