refactor(PVS/V560): ap == NULL is always false

This commit is contained in:
zeertzjq 2022-03-02 15:14:11 +08:00
parent 4b3f920477
commit 22d1b2423f

View File

@ -131,10 +131,8 @@ Array nvim_get_autocmds(Dict(get_autocmds) *opts, Error *err)
continue; continue;
} }
for (AutoPat *ap = au_get_autopat_for_event(event); for (AutoPat *ap = au_get_autopat_for_event(event); ap != NULL; ap = ap->next) {
ap != NULL; if (ap->cmds == NULL) {
ap = ap->next) {
if (ap == NULL || ap->cmds == NULL) {
continue; continue;
} }