aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-10 00:15:24 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-11 01:43:13 +0100
commit6d057a2ca53f295f2db9a89b924f904128e4ce34 (patch)
treea88a7f96badb94b26ffe0e22978453898c2ff50b /src
parent4e02a1bf46995e784ea6f7688113a02a8dd3f8ed (diff)
downloadrneovim-6d057a2ca53f295f2db9a89b924f904128e4ce34.tar.gz
rneovim-6d057a2ca53f295f2db9a89b924f904128e4ce34.tar.bz2
rneovim-6d057a2ca53f295f2db9a89b924f904128e4ce34.zip
Fix warnings: fileio.c: aucmd_prepbuf(): Np dereference: FP.
Problem : Dereference of null pointer @ 6219. Diagnostic : False positive. Rationale : Problem occurs if `aucmd_win` is NULL after `win_alloc_aucmd_win()`, which cannot happen since it uses new memory functions. So, this is a leftover since OOM refactorization. Resolution : Remove dead code.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 16431d14c3..05a0a59874 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -6191,12 +6191,9 @@ aucmd_prepbuf (
}
}
- /* Allocate "aucmd_win" when needed. If this fails (out of memory) fall
- * back to using the current window. */
+ /* Allocate "aucmd_win" when needed. */
if (win == NULL && aucmd_win == NULL) {
win_alloc_aucmd_win();
- if (aucmd_win == NULL)
- win = curwin;
}
if (win == NULL && aucmd_win_used)
/* Strange recursive autocommand, fall back to using the current