diff options
Diffstat (limited to 'src/nvim/lua')
| -rw-r--r-- | src/nvim/lua/converter.c | 3 | ||||
| -rw-r--r-- | src/nvim/lua/stdlib.c | 15 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c index bdb0719809..d7881350aa 100644 --- a/src/nvim/lua/converter.c +++ b/src/nvim/lua/converter.c @@ -906,9 +906,8 @@ Float nlua_pop_Float(lua_State *lstate, Error *err) lua_pop(lstate, 1); if (table_props.type != kObjectTypeFloat) { return 0; - } else { - return (Float)table_props.val; } + return (Float)table_props.val; } /// Convert lua table to array without determining whether it is array 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; |