aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-08 21:34:46 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-19 14:50:23 -0300
commita80d7e86c1f088c5b68d8e8929cc72a0d9680f76 (patch)
treecc9cc71ee35fe966779cf6764bd5faabd1186df3 /src/nvim/buffer.c
parentb63d2626ed9e3e38a485b9990a8e65ba59d6906a (diff)
downloadrneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.tar.gz
rneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.tar.bz2
rneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.zip
Remove NULL/non-NULL tests after calls to vim_str(n)save()
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 42b7826981..065c7e69c3 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2237,9 +2237,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
@@ -4116,8 +4115,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;