0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -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

@@ -3084,13 +3084,13 @@ concat_fnames(char_u *fname1, char_u *fname2, int sep)
char_u *dest;
dest = alloc(STRLEN(fname1) + STRLEN(fname2) + 3);
if (dest != NULL)
{
STRCPY(dest, fname1);
if (sep)
add_pathsep(dest);
STRCAT(dest, fname2);
}
if (dest == NULL)
return NULL;
STRCPY(dest, fname1);
if (sep)
add_pathsep(dest);
STRCAT(dest, fname2);
return dest;
}
@@ -3122,14 +3122,14 @@ FullName_save(
return NULL;
buf = alloc(MAXPATHL);
if (buf != NULL)
{
if (vim_FullName(fname, buf, MAXPATHL, force) != FAIL)
new_fname = vim_strsave(buf);
else
new_fname = vim_strsave(fname);
vim_free(buf);
}
if (buf == NULL)
return NULL;
if (vim_FullName(fname, buf, MAXPATHL, force) != FAIL)
new_fname = vim_strsave(buf);
else
new_fname = vim_strsave(fname);
vim_free(buf);
return new_fname;
}