commit cdd801746943d1b8319bdc92023c9a62f0076b72
parent 1027ccac6d0a399364a94c17d39295d69b90d7b4
Author: sus-domesticus <susdomesticus@tutamail.com>
Date: Tue, 2 Jan 2024 23:53:15 +0200
fix(clangd): set block pointer to null in case map is empty
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)