option: fix pvs/v547

This commit is contained in:
Jan Edmund Lazo 2020-06-08 21:40:48 -04:00
parent e34a7bca68
commit b7cae2bca3
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -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
@ -5487,9 +5484,6 @@ static int put_setstring(FILE *fd, char *cmd, char *name,
if (size >= MAXPATHL && (flags & P_COMMA) != 0
&& vim_strchr(*valuep, ',') != NULL) {
part = xmalloc(size);
if (part == NULL) {
goto fail;
}
// write line break to clear the option, e.g. ':set rtp='
if (put_eol(fd) == FAIL) {