mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
refactor(PVS/V547): aucmd.type == CALLABLE_NONE is always false
This commit is contained in:
@@ -424,13 +424,6 @@ Integer nvim_create_autocmd(uint64_t channel_id, Object event, Dict(create_autoc
|
|||||||
ADD(patterns, STRING_OBJ(cstr_to_string((char *)pattern_buflocal)));
|
ADD(patterns, STRING_OBJ(cstr_to_string((char *)pattern_buflocal)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aucmd.type == CALLABLE_NONE) {
|
|
||||||
api_set_error(err,
|
|
||||||
kErrorTypeValidation,
|
|
||||||
"'command' or 'callback' is required");
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opts->desc.type != kObjectTypeNil) {
|
if (opts->desc.type != kObjectTypeNil) {
|
||||||
if (opts->desc.type == kObjectTypeString) {
|
if (opts->desc.type == kObjectTypeString) {
|
||||||
desc = opts->desc.data.string.data;
|
desc = opts->desc.data.string.data;
|
||||||
|
Reference in New Issue
Block a user