mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1246: 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 #11887)
This commit is contained in:
committed by
Bram Moolenaar
parent
032713f829
commit
142ed77898
@@ -3939,18 +3939,18 @@ delete_def_function_contents(dfunc_T *dfunc, int mark_deleted)
|
||||
void
|
||||
unlink_def_function(ufunc_T *ufunc)
|
||||
{
|
||||
if (ufunc->uf_dfunc_idx > 0)
|
||||
{
|
||||
dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
|
||||
+ ufunc->uf_dfunc_idx;
|
||||
if (ufunc->uf_dfunc_idx <= 0)
|
||||
return;
|
||||
|
||||
if (--dfunc->df_refcount <= 0)
|
||||
delete_def_function_contents(dfunc, TRUE);
|
||||
ufunc->uf_def_status = UF_NOT_COMPILED;
|
||||
ufunc->uf_dfunc_idx = 0;
|
||||
if (dfunc->df_ufunc == ufunc)
|
||||
dfunc->df_ufunc = NULL;
|
||||
}
|
||||
dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
|
||||
+ ufunc->uf_dfunc_idx;
|
||||
|
||||
if (--dfunc->df_refcount <= 0)
|
||||
delete_def_function_contents(dfunc, TRUE);
|
||||
ufunc->uf_def_status = UF_NOT_COMPILED;
|
||||
ufunc->uf_dfunc_idx = 0;
|
||||
if (dfunc->df_ufunc == ufunc)
|
||||
dfunc->df_ufunc = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3959,13 +3959,13 @@ unlink_def_function(ufunc_T *ufunc)
|
||||
void
|
||||
link_def_function(ufunc_T *ufunc)
|
||||
{
|
||||
if (ufunc->uf_dfunc_idx > 0)
|
||||
{
|
||||
dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
|
||||
+ ufunc->uf_dfunc_idx;
|
||||
if (ufunc->uf_dfunc_idx <= 0)
|
||||
return;
|
||||
|
||||
++dfunc->df_refcount;
|
||||
}
|
||||
dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
|
||||
+ ufunc->uf_dfunc_idx;
|
||||
|
||||
++dfunc->df_refcount;
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
|
Reference in New Issue
Block a user