aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/stdlib.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-08 09:48:48 +0100
committerGitHub <noreply@github.com>2022-11-08 09:48:48 +0100
commitfae754073289566051433fae74ec65783f9e7a6a (patch)
tree27fa3555e5a8a016dce55cc39f20599e32cf7046 /src/nvim/lua/stdlib.c
parentd187c00faf4feb76bdc544b87bea71f217d05957 (diff)
parent731cdde28ea8d48cc23ba2752a08c261c87eee92 (diff)
downloadrneovim-fae754073289566051433fae74ec65783f9e7a6a.tar.gz
rneovim-fae754073289566051433fae74ec65783f9e7a6a.tar.bz2
rneovim-fae754073289566051433fae74ec65783f9e7a6a.zip
Merge pull request #20821 from dundargoc/refactor/clang-tidy
refactor: fix clang-tidy warnings
Diffstat (limited to 'src/nvim/lua/stdlib.c')
-rw-r--r--src/nvim/lua/stdlib.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c
index 6974c6181c..54e2c24523 100644
--- a/src/nvim/lua/stdlib.c
+++ b/src/nvim/lua/stdlib.c
@@ -378,15 +378,14 @@ int nlua_setvar(lua_State *lstate)
if (di == NULL) {
// Doesn't exist, nothing to do
return 0;
- } else {
- // Notify watchers
- if (watched) {
- tv_dict_watcher_notify(dict, key.data, NULL, &di->di_tv);
- }
-
- // Delete the entry
- tv_dict_item_remove(dict, di);
}
+ // Notify watchers
+ if (watched) {
+ tv_dict_watcher_notify(dict, key.data, NULL, &di->di_tv);
+ }
+
+ // Delete the entry
+ tv_dict_item_remove(dict, di);
} else {
// Update the key
typval_T tv;