From 0cf556e88932d5f98b79f9e4cce54a6ebb3f17a9 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Fri, 17 Feb 2012 10:20:06 -0600 Subject: [PATCH] fix 2 clang -analyze warnings --- spectrwm.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 4d4c12a..02be1c5 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -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) -- 1.7.10.4