summaryrefslogtreecommitdiff
path: root/src/sign.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-28 23:08:19 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-28 23:08:19 +0200
commitc799fe206e61f2e2c1231bc46cbe4bb354f3da69 (patch)
tree68b3d2a8bb82519e29fc95f317d2ee02b07f95fa /src/sign.c
parentb58a4b938c4bc7e0499700859bd7abba9acc5b11 (diff)
downloadvim-git-c799fe206e61f2e2c1231bc46cbe4bb354f3da69.tar.gz
patch 8.1.1414: alloc() returning "char_u *" causes a lot of type castsv8.1.1414
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.
Diffstat (limited to 'src/sign.c')
-rw-r--r--src/sign.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sign.c b/src/sign.c
index 9766d4e75..b89bea073 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -85,7 +85,7 @@ sign_group_ref(char_u *groupname)
if (HASHITEM_EMPTY(hi))
{
// new group
- group = (signgroup_T *)alloc(sizeof(signgroup_T) + STRLEN(groupname));
+ group = alloc(sizeof(signgroup_T) + STRLEN(groupname));
if (group == NULL)
return NULL;
STRCPY(group->sg_name, groupname);
@@ -201,8 +201,7 @@ insert_sign(
{
signlist_T *newsign;
- newsign = (signlist_T *)lalloc_id(sizeof(signlist_T), FALSE,
- aid_insert_sign);
+ newsign = lalloc_id(sizeof(signlist_T), FALSE, aid_insert_sign);
if (newsign != NULL)
{
newsign->id = id;
@@ -736,7 +735,7 @@ alloc_new_sign(char_u *name)
int start = next_sign_typenr;
// Allocate a new sign.
- sp = (sign_T *)alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
+ sp = alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
if (sp == NULL)
return NULL;