mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
option: fix pvs/v547
This commit is contained in:
parent
e34a7bca68
commit
b7cae2bca3
@ -5476,9 +5476,6 @@ static int put_setstring(FILE *fd, char *cmd, char *name,
|
|||||||
|
|
||||||
// replace home directory in the whole option value into "buf"
|
// replace home directory in the whole option value into "buf"
|
||||||
buf = xmalloc(size);
|
buf = xmalloc(size);
|
||||||
if (buf == NULL) {
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
home_replace(NULL, *valuep, buf, size, false);
|
home_replace(NULL, *valuep, buf, size, false);
|
||||||
|
|
||||||
// If the option value is longer than MAXPATHL, we need to append
|
// If the option value is longer than MAXPATHL, we need to append
|
||||||
@ -5487,9 +5484,6 @@ static int put_setstring(FILE *fd, char *cmd, char *name,
|
|||||||
if (size >= MAXPATHL && (flags & P_COMMA) != 0
|
if (size >= MAXPATHL && (flags & P_COMMA) != 0
|
||||||
&& vim_strchr(*valuep, ',') != NULL) {
|
&& vim_strchr(*valuep, ',') != NULL) {
|
||||||
part = xmalloc(size);
|
part = xmalloc(size);
|
||||||
if (part == NULL) {
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
// write line break to clear the option, e.g. ':set rtp='
|
// write line break to clear the option, e.g. ':set rtp='
|
||||||
if (put_eol(fd) == FAIL) {
|
if (put_eol(fd) == FAIL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user