JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix 2 clang -analyze warnings
authorMarco Peereboom <marco@conformal.com>
Fri, 17 Feb 2012 16:20:06 +0000 (10:20 -0600)
committerMarco Peereboom <marco@conformal.com>
Fri, 17 Feb 2012 16:20:06 +0000 (10:20 -0600)
spectrwm.c

index 4d4c12a..02be1c5 100644 (file)
@@ -1482,14 +1482,15 @@ bar_update(void)
                                if (r->ws->name)
                                        snprintf(ws, sizeof ws, "<%s>",
                                            r->ws->name);
+                               if (stack_enabled)
+                                       stack = r->ws->stacker;
+
+                               snprintf(loc, sizeof loc, 
+                                   "%d:%d %s %s   %s%s    %s    %s",
+                                   x++, r->ws->idx + 1, stack, ws, s, cn,
+                                   bar_ext, bar_vertext);
+                               bar_print(r, loc);
                        }
-                       if (stack_enabled)
-                               stack = r->ws->stacker;
-
-                       snprintf(loc, sizeof loc, "%d:%d %s %s   %s%s    %s    "
-                           "%s", x++, r->ws->idx + 1, stack, ws, s, cn,
-                           bar_ext, bar_vertext);
-                       bar_print(r, loc);
                }
        }
        alarm(bar_delay);
@@ -2534,8 +2535,6 @@ focus_prev(struct ws_win *win)
            (ws->cur_layout->flags & SWM_L_FOCUSPREV)) {
                if (cur_focus != ws->focus_prev)
                        winfocus = ws->focus_prev;
-               else if (cur_focus != ws->focus)
-                       winfocus = ws->focus;
                else
                        winfocus = TAILQ_PREV(win, ws_win_list, entry);
                if (winfocus)