diff options
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index e1f9454b52..2e932e9695 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4345,11 +4345,10 @@ static int make_bom(char_u *buf, char_u *name) void shorten_fnames(int force) { char_u dirname[MAXPATHL]; - buf_T *buf; char_u *p; os_dirname(dirname, MAXPATHL); - for (buf = firstbuf; buf != NULL; buf = buf->b_next) { + FOR_ALL_BUFFERS(buf) { if (buf->b_fname != NULL && !bt_nofile(buf) && !path_with_url(buf->b_fname) @@ -6109,7 +6108,6 @@ void ex_doautoall(exarg_T *eap) { int retval; aco_save_T aco; - buf_T *buf; char_u *arg = eap->arg; int call_do_modelines = check_nomodeline(&arg); @@ -6120,7 +6118,7 @@ void ex_doautoall(exarg_T *eap) * gives problems when the autocommands make changes to the list of * buffers or windows... */ - for (buf = firstbuf; buf != NULL; buf = buf->b_next) { + FOR_ALL_BUFFERS(buf) { if (buf->b_ml.ml_mfp != NULL) { /* find a window for this buffer and save some values */ aucmd_prepbuf(&aco, buf); |