aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsus-domesticus <susdomesticus@tutamail.com>2024-01-02 23:53:15 +0200
committersus-domesticus <susdomesticus@tutamail.com>2024-01-03 00:00:37 +0200
commitcdd801746943d1b8319bdc92023c9a62f0076b72 (patch)
tree5ae6306416a9f21a021def7ad856e6d6a5349fbf
parent1027ccac6d0a399364a94c17d39295d69b90d7b4 (diff)
downloadrneovim-cdd801746943d1b8319bdc92023c9a62f0076b72.tar.gz
rneovim-cdd801746943d1b8319bdc92023c9a62f0076b72.tar.bz2
rneovim-cdd801746943d1b8319bdc92023c9a62f0076b72.zip
fix(clangd): set block pointer to null in case map is empty
-rw-r--r--src/nvim/memfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index e7b23021dd..8869a428d1 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -391,7 +391,7 @@ int mf_sync(memfile_T *mfp, int flags)
// Then we only try to write blocks within the existing file. If that also
// fails then we give up.
int status = OK;
- bhdr_T *hp;
+ bhdr_T *hp = NULL;
// note, "last" block is typically earlier in the hash list
map_foreach_value(&mfp->mf_hash, hp, {
if (((flags & MFS_ALL) || hp->bh_bnum >= 0)