0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -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

@@ -157,22 +157,22 @@ serverConvert(
char_u *res = data;
*tofree = NULL;
if (client_enc != NULL && p_enc != NULL)
{
vimconv_T vimconv;
if (client_enc == NULL || p_enc == NULL)
return res;
vimconv.vc_type = CONV_NONE;
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
&& vimconv.vc_type != CONV_NONE)
{
res = string_convert(&vimconv, data, NULL);
if (res == NULL)
res = data;
else
*tofree = res;
}
convert_setup(&vimconv, NULL, NULL);
vimconv_T vimconv;
vimconv.vc_type = CONV_NONE;
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
&& vimconv.vc_type != CONV_NONE)
{
res = string_convert(&vimconv, data, NULL);
if (res == NULL)
res = data;
else
*tofree = res;
}
convert_setup(&vimconv, NULL, NULL);
return res;
}
#endif