mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
refactor(options): fix coverity warning about unintialized sc_chan (#32630)
This commit is contained in:
@@ -3485,15 +3485,7 @@ static const char *did_set_option(OptIndex opt_idx, void *varp, OptVal old_value
|
|||||||
new_value = optval_from_varp(opt_idx, varp);
|
new_value = optval_from_varp(opt_idx, varp);
|
||||||
|
|
||||||
if (set_sid != SID_NONE) {
|
if (set_sid != SID_NONE) {
|
||||||
sctx_T script_ctx;
|
sctx_T script_ctx = set_sid == 0 ? current_sctx : (sctx_T){ .sc_sid = set_sid };
|
||||||
|
|
||||||
if (set_sid == 0) {
|
|
||||||
script_ctx = current_sctx;
|
|
||||||
} else {
|
|
||||||
script_ctx.sc_sid = set_sid;
|
|
||||||
script_ctx.sc_seq = 0;
|
|
||||||
script_ctx.sc_lnum = 0;
|
|
||||||
}
|
|
||||||
// Remember where the option was set.
|
// Remember where the option was set.
|
||||||
set_option_sctx(opt_idx, opt_flags, script_ctx);
|
set_option_sctx(opt_idx, opt_flags, script_ctx);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user