aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2015-01-23 14:38:39 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2015-01-27 01:33:34 +0100
commit00f18e2e09af35494d0b94ae76a9dbc3e0319d89 (patch)
treee30a14192b64404578e415e2929888d57cd49fc7 /src/nvim/memline.c
parent883e3a7a73ec246b3534bae9340b6c4e89c4c467 (diff)
downloadrneovim-00f18e2e09af35494d0b94ae76a9dbc3e0319d89.tar.gz
rneovim-00f18e2e09af35494d0b94ae76a9dbc3e0319d89.tar.bz2
rneovim-00f18e2e09af35494d0b94ae76a9dbc3e0319d89.zip
Remove nonnullret deadcode: xmalloc.
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 1fa6d6acc6..29b372e057 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -1240,10 +1240,8 @@ theend:
mf_put(mfp, hp, false, false);
mf_close(mfp, false); /* will also free(mfp->mf_fname) */
}
- if (buf != NULL) {
- free(buf->b_ml.ml_stack);
- free(buf);
- }
+ free(buf->b_ml.ml_stack);
+ free(buf);
if (serious_error && called_from_main)
ml_close(curbuf, TRUE);
else {
@@ -3279,10 +3277,7 @@ findswapname (
/*
* we try different names until we find one that does not exist yet
*/
- if (dir_name == NULL) /* out of memory */
- fname = NULL;
- else
- fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
+ fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
for (;; ) {
if (fname == NULL) /* must be out of memory */