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:
zeertzjq
2023-01-24 08:43:51 +08:00
committed by GitHub
parent dbb6c7f1b8
commit fa12b9ca2b
11 changed files with 559 additions and 491 deletions

View File

@@ -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);
}
}