about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@openmailbox.org>2015-10-09 11:20:49 +0200
committerMichael Vetter <jubalh@openmailbox.org>2015-10-12 09:29:01 +0200
commitdd2ce7a5bfe6b854f8a54137c6bbcf536de1ddd7 (patch)
treefa2fc048520b9578bf23b1cbdac66bc7c0a018b0 /src/ui/window.c
parent8dfa41ea8e05262225c83e38ccba1ea83f10e4b8 (diff)
downloadprofani-tty-dd2ce7a5bfe6b854f8a54137c6bbcf536de1ddd7.tar.gz
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.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 8579b02f..261b9380 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -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 {