mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1183: 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 #11805)
This commit is contained in:
committed by
Bram Moolenaar
parent
043d7b2c84
commit
0233bdfa2b
@@ -1393,34 +1393,31 @@ static PySequenceMethods WinListAsSeq = {
|
||||
void
|
||||
python_buffer_free(buf_T *buf)
|
||||
{
|
||||
if (BUF_PYTHON_REF(buf) != NULL)
|
||||
{
|
||||
BufferObject *bp = BUF_PYTHON_REF(buf);
|
||||
bp->buf = INVALID_BUFFER_VALUE;
|
||||
BUF_PYTHON_REF(buf) = NULL;
|
||||
}
|
||||
BufferObject *bp = BUF_PYTHON_REF(buf);
|
||||
if (bp == NULL)
|
||||
return;
|
||||
bp->buf = INVALID_BUFFER_VALUE;
|
||||
BUF_PYTHON_REF(buf) = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
python_window_free(win_T *win)
|
||||
{
|
||||
if (WIN_PYTHON_REF(win) != NULL)
|
||||
{
|
||||
WindowObject *wp = WIN_PYTHON_REF(win);
|
||||
wp->win = INVALID_WINDOW_VALUE;
|
||||
WIN_PYTHON_REF(win) = NULL;
|
||||
}
|
||||
WindowObject *wp = WIN_PYTHON_REF(win);
|
||||
if (wp == NULL)
|
||||
return;
|
||||
wp->win = INVALID_WINDOW_VALUE;
|
||||
WIN_PYTHON_REF(win) = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
python_tabpage_free(tabpage_T *tab)
|
||||
{
|
||||
if (TAB_PYTHON_REF(tab) != NULL)
|
||||
{
|
||||
TabPageObject *tp = TAB_PYTHON_REF(tab);
|
||||
tp->tab = INVALID_TABPAGE_VALUE;
|
||||
TAB_PYTHON_REF(tab) = NULL;
|
||||
}
|
||||
TabPageObject *tp = TAB_PYTHON_REF(tab);
|
||||
if (tp == NULL)
|
||||
return;
|
||||
tp->tab = INVALID_TABPAGE_VALUE;
|
||||
TAB_PYTHON_REF(tab) = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user