aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-05-22 12:50:59 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-05-22 13:00:51 -0400
commite2e47803bdfd5fb40e3dbc9cdf798bb27d306c72 (patch)
tree6ff1b06b5d5fd6d3260f3a778c33cfaf03f0c295 /src/nvim/buffer.c
parent0aa8b5828cc0674894681841f40c3c05bfd2f07b (diff)
parente303a11ebfc352860cce73184ece692ab4d0f01c (diff)
downloadrneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.gz
rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.bz2
rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.zip
Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 03dd972df1..ffb62add3c 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2235,9 +2235,8 @@ setfname (
close_buffer(NULL, obuf, DOBUF_WIPE, FALSE);
}
sfname = vim_strsave(sfname);
- if (ffname == NULL || sfname == NULL) {
+ if (ffname == NULL) {
free(sfname);
- free(ffname);
return FAIL;
}
#ifdef USE_FNAME_CASE
@@ -4114,8 +4113,6 @@ chk_modeline (
while (s[-1] != ':');
s = linecopy = vim_strsave(s); /* copy the line, it will change */
- if (linecopy == NULL)
- return FAIL;
save_sourcing_lnum = sourcing_lnum;
save_sourcing_name = sourcing_name;