summaryrefslogtreecommitdiff
path: root/src/memfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-24 22:04:11 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-24 22:04:11 +0200
commit2932359000b2f918d5fade79ea4d124d5943cd07 (patch)
tree1ca4fa98569a4d20ce066c7d6254404bcf431b47 /src/memfile.c
parent6835dc61aebca2b602d85a9d63c449ace58683b4 (diff)
downloadvim-git-2932359000b2f918d5fade79ea4d124d5943cd07.tar.gz
patch 7.4.2101v7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
Diffstat (limited to 'src/memfile.c')
-rw-r--r--src/memfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/memfile.c b/src/memfile.c
index e2fadc2e5..4a4843000 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -796,7 +796,7 @@ mf_release(memfile_T *mfp, int page_count)
if (mfp->mf_fd < 0 && need_release && p_uc)
{
/* find for which buffer this memfile is */
- for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ FOR_ALL_BUFFERS(buf)
if (buf->b_ml.ml_mfp == mfp)
break;
if (buf != NULL && buf->b_may_swap)
@@ -861,7 +861,7 @@ mf_release_all(void)
bhdr_T *hp;
int retval = FALSE;
- for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ FOR_ALL_BUFFERS(buf)
{
mfp = buf->b_ml.ml_mfp;
if (mfp != NULL)