commit 22d1b2423f6abe177ce8a99f460cfedd5bc7eecc parent 4b3f920477e9838c3f3a9cd67a47d1494b9cc229 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed, 2 Mar 2022 15:14:11 +0800 refactor(PVS/V560): ap == NULL is always false Diffstat:
| M | src/nvim/api/autocmd.c | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c @@ -131,10 +131,8 @@ Array nvim_get_autocmds(Dict(get_autocmds) *opts, Error *err) continue; } - for (AutoPat *ap = au_get_autopat_for_event(event); - ap != NULL; - ap = ap->next) { - if (ap == NULL || ap->cmds == NULL) { + for (AutoPat *ap = au_get_autopat_for_event(event); ap != NULL; ap = ap->next) { + if (ap->cmds == NULL) { continue; }