diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-02 15:14:11 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-03-02 15:14:11 +0800 |
commit | 22d1b2423f6abe177ce8a99f460cfedd5bc7eecc (patch) | |
tree | c941fb7b1a20af34243de4ef4096e3ec2c3b2cde | |
parent | 4b3f920477e9838c3f3a9cd67a47d1494b9cc229 (diff) | |
download | rneovim-22d1b2423f6abe177ce8a99f460cfedd5bc7eecc.tar.gz rneovim-22d1b2423f6abe177ce8a99f460cfedd5bc7eecc.tar.bz2 rneovim-22d1b2423f6abe177ce8a99f460cfedd5bc7eecc.zip |
refactor(PVS/V560): ap == NULL is always false
-rw-r--r-- | src/nvim/api/autocmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 9a8eccd22c..2e19987609 100644 --- 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; } |