Merge pull request #17321 from dundargoc/refactor/pvs/v547

refactor(PVS/V547): expression is always true/false
This commit is contained in:
zeertzjq 2022-02-09 10:08:16 +08:00 committed by GitHub
commit 07c97fa02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,7 +285,7 @@ void aubuflocal_remove(buf_T *buf)
}
// Add an autocmd group name.
// Return its ID. Returns AUGROUP_ERROR (< 0) for error.
// Return its ID.
static int au_new_group(char_u *name)
{
int i = au_find_group(name);
@ -379,10 +379,7 @@ void do_augroup(char_u *arg, int del_group)
} else if (STRICMP(arg, "end") == 0) { // ":aug end": back to group 0
current_augroup = AUGROUP_DEFAULT;
} else if (*arg) { // ":aug xxx": switch to group xxx
int i = au_new_group(arg);
if (i != AUGROUP_ERROR) {
current_augroup = i;
}
current_augroup = au_new_group(arg);
} else { // ":aug": list the group names
msg_start();
for (int i = 0; i < augroups.ga_len; i++) {