commit | c799fe206e61f2e2c1231bc46cbe4bb354f3da69 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue May 28 23:08:19 2019 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue May 28 23:08:19 2019 +0200 |
tree | 68b3d2a8bb82519e29fc95f317d2ee02b07f95fa | |
parent | b58a4b938c4bc7e0499700859bd7abba9acc5b11 [diff] [blame] |
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/diff.c b/src/diff.c index 0db2820..260fdd9 100644 --- a/src/diff.c +++ b/src/diff.c
@@ -537,7 +537,7 @@ { diff_T *dnew; - dnew = (diff_T *)alloc(sizeof(diff_T)); + dnew = ALLOC_ONE(diff_T); if (dnew != NULL) { dnew->df_next = dp;