aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c8
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) {