mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #7839 'coverity fixes'
This commit is contained in:
commit
f09a30d5b0
@ -11110,6 +11110,7 @@ void get_user_input(const typval_T *const argvars,
|
||||
char defstr_buf[NUMBUFLEN];
|
||||
char cancelreturn_buf[NUMBUFLEN];
|
||||
char xp_name_buf[NUMBUFLEN];
|
||||
char def[1] = { 0 };
|
||||
if (argvars[0].v_type == VAR_DICT) {
|
||||
if (argvars[1].v_type != VAR_UNKNOWN) {
|
||||
emsgf(_("E5050: {opts} must be the only argument"));
|
||||
@ -11124,7 +11125,6 @@ void get_user_input(const typval_T *const argvars,
|
||||
if (defstr == NULL) {
|
||||
return;
|
||||
}
|
||||
char def[1] = { 0 };
|
||||
cancelreturn = tv_dict_get_string_buf_chk(dict, S_LEN("cancelreturn"),
|
||||
cancelreturn_buf, def);
|
||||
if (cancelreturn == NULL) { // error
|
||||
|
@ -285,7 +285,7 @@ typval_T decode_string(const char *const s, const size_t len,
|
||||
.v_type = VAR_STRING,
|
||||
.v_lock = VAR_UNLOCKED,
|
||||
.vval = { .v_string = (char_u *)(
|
||||
s_allocated ? (char *)s : xmemdupz(s, len)) },
|
||||
(s == NULL || s_allocated) ? (char *)s : xmemdupz(s, len)) },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user