Reduce scope of variables in ui/core

Not as important as the other one (where there was a double
declaration). But for the sake of consistency.
This commit is contained in:
Michael Vetter
2015-10-09 11:20:49 +02:00
parent 8dfa41ea8e
commit dd2ce7a5bf
2 changed files with 7 additions and 11 deletions

View File

@@ -471,12 +471,12 @@ win_clear(ProfWin *window)
void
win_resize(ProfWin *window)
{
int subwin_cols = 0;
int cols = getmaxx(stdscr);
if (window->layout->type == LAYOUT_SPLIT) {
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
if (layout->subwin) {
int subwin_cols = 0;
if (window->type == WIN_CONSOLE) {
subwin_cols = win_roster_cols();
} else if (window->type == WIN_MUC) {
@@ -506,11 +506,11 @@ win_update_virtual(ProfWin *window)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
int subwin_cols = 0;
if (window->layout->type == LAYOUT_SPLIT) {
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
if (layout->subwin) {
int subwin_cols = 0;
if (window->type == WIN_MUC) {
subwin_cols = win_occpuants_cols();
} else {