0
0
mirror of https://github.com/vim/vim.git synced 2025-10-16 07:24:23 -04:00

patch 9.0.1166: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11792)
This commit is contained in:
Yegappan Lakshmanan
2023-01-09 19:04:23 +00:00
committed by Bram Moolenaar
parent 765d82a657
commit 1cfb14aa97
22 changed files with 929 additions and 903 deletions

View File

@@ -1345,33 +1345,32 @@ ff_check_visited(
* New file/dir. Add it to the list of visited files/dirs.
*/
vp = alloc(sizeof(ff_visited_T) + STRLEN(ff_expand_buffer));
if (vp == NULL)
return OK;
if (vp != NULL)
#ifdef UNIX
if (!url)
{
#ifdef UNIX
if (!url)
{
vp->ffv_dev_valid = TRUE;
vp->ffv_ino = st.st_ino;
vp->ffv_dev = st.st_dev;
vp->ffv_fname[0] = NUL;
}
else
{
vp->ffv_dev_valid = FALSE;
#endif
STRCPY(vp->ffv_fname, ff_expand_buffer);
#ifdef UNIX
}
#endif
if (wc_path != NULL)
vp->ffv_wc_path = vim_strsave(wc_path);
else
vp->ffv_wc_path = NULL;
vp->ffv_next = *visited_list;
*visited_list = vp;
vp->ffv_dev_valid = TRUE;
vp->ffv_ino = st.st_ino;
vp->ffv_dev = st.st_dev;
vp->ffv_fname[0] = NUL;
}
else
{
vp->ffv_dev_valid = FALSE;
#endif
STRCPY(vp->ffv_fname, ff_expand_buffer);
#ifdef UNIX
}
#endif
if (wc_path != NULL)
vp->ffv_wc_path = vim_strsave(wc_path);
else
vp->ffv_wc_path = NULL;
vp->ffv_next = *visited_list;
*visited_list = vp;
return OK;
}