mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
vim-patch:partial:9.0.1237: code is indented more than necessary (#21971)
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11858)
6ec6666047
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -122,17 +122,17 @@ static signgroup_T *sign_group_ref(const char *groupname)
|
||||
/// removed, then remove the group.
|
||||
static void sign_group_unref(char *groupname)
|
||||
{
|
||||
signgroup_T *group;
|
||||
|
||||
hashitem_T *hi = hash_find(&sg_table, groupname);
|
||||
if (!HASHITEM_EMPTY(hi)) {
|
||||
group = HI2SG(hi);
|
||||
group->sg_refcount--;
|
||||
if (group->sg_refcount == 0) {
|
||||
// All the signs in this group are removed
|
||||
hash_remove(&sg_table, hi);
|
||||
xfree(group);
|
||||
}
|
||||
if (HASHITEM_EMPTY(hi)) {
|
||||
return;
|
||||
}
|
||||
|
||||
signgroup_T *group = HI2SG(hi);
|
||||
group->sg_refcount--;
|
||||
if (group->sg_refcount == 0) {
|
||||
// All the signs in this group are removed
|
||||
hash_remove(&sg_table, hi);
|
||||
xfree(group);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user