comparison src/sign.c @ 16782:fc58fee685e2 v8.1.1393

patch 8.1.1393: unnecessary type casts commit https://github.com/vim/vim/commit/51e14387f120392b74b84408cafec33942337a05 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 25 20:21:28 2019 +0200 patch 8.1.1393: unnecessary type casts Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 May 2019 20:30:06 +0200
parents 695d9ef00b03
children ce04ebdf26b8
comparison
equal deleted inserted replaced
16781:db5dc8db015c 16782:fc58fee685e2
83 hash = hash_hash(groupname); 83 hash = hash_hash(groupname);
84 hi = hash_lookup(&sg_table, groupname, hash); 84 hi = hash_lookup(&sg_table, groupname, hash);
85 if (HASHITEM_EMPTY(hi)) 85 if (HASHITEM_EMPTY(hi))
86 { 86 {
87 // new group 87 // new group
88 group = (signgroup_T *)alloc( 88 group = (signgroup_T *)alloc(sizeof(signgroup_T) + STRLEN(groupname));
89 (unsigned)(sizeof(signgroup_T) + STRLEN(groupname)));
90 if (group == NULL) 89 if (group == NULL)
91 return NULL; 90 return NULL;
92 STRCPY(group->sg_name, groupname); 91 STRCPY(group->sg_name, groupname);
93 group->refcount = 1; 92 group->refcount = 1;
94 group->next_sign_id = 1; 93 group->next_sign_id = 1;
735 sign_T *sp; 734 sign_T *sp;
736 sign_T *lp; 735 sign_T *lp;
737 int start = next_sign_typenr; 736 int start = next_sign_typenr;
738 737
739 // Allocate a new sign. 738 // Allocate a new sign.
740 sp = (sign_T *)alloc_clear_id((unsigned)sizeof(sign_T), 739 sp = (sign_T *)alloc_clear_id(sizeof(sign_T), aid_sign_define_by_name);
741 aid_sign_define_by_name);
742 if (sp == NULL) 740 if (sp == NULL)
743 return NULL; 741 return NULL;
744 742
745 // Check that next_sign_typenr is not already being used. 743 // Check that next_sign_typenr is not already being used.
746 // This only happens after wrapping around. Hopefully 744 // This only happens after wrapping around. Hopefully