diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-06-08 21:40:48 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-06-18 18:01:42 -0400 |
commit | b7cae2bca3028c170871f05670bbd6a7ad508c56 (patch) | |
tree | 6a000a3cff915e40077589ad7725bed08bf43888 | |
parent | e34a7bca6829e7be86a23054b4eb9ab250909b30 (diff) | |
download | rneovim-b7cae2bca3028c170871f05670bbd6a7ad508c56.tar.gz rneovim-b7cae2bca3028c170871f05670bbd6a7ad508c56.tar.bz2 rneovim-b7cae2bca3028c170871f05670bbd6a7ad508c56.zip |
option: fix pvs/v547
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index dc7f3f55ac..d789ad3587 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5476,9 +5476,6 @@ static int put_setstring(FILE *fd, char *cmd, char *name, // replace home directory in the whole option value into "buf" buf = xmalloc(size); - if (buf == NULL) { - goto fail; - } home_replace(NULL, *valuep, buf, size, false); // If the option value is longer than MAXPATHL, we need to append @@ -5486,10 +5483,7 @@ static int put_setstring(FILE *fd, char *cmd, char *name, // can be expanded when read back. if (size >= MAXPATHL && (flags & P_COMMA) != 0 && vim_strchr(*valuep, ',') != NULL) { - part = xmalloc(size); - if (part == NULL) { - goto fail; - } + part = xmalloc(size); // write line break to clear the option, e.g. ':set rtp=' if (put_eol(fd) == FAIL) { |