From 3f1efd2140c58164d692a107aa468048e756036c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 25 Nov 2013 02:08:17 +0100 Subject: [PATCH] Slightly improved code style and comments in sorted_wintoggle_and_activate(). --- src/wincontrol.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wincontrol.c b/src/wincontrol.c index 6fb9acb..ee547eb 100644 --- a/src/wincontrol.c +++ b/src/wincontrol.c @@ -388,17 +388,17 @@ extern void sorted_wintoggle_and_activate() { char * f_name = "sorted_wintoggle_and_activate()"; + /* Read from file order of windows to be toggled + active win selection. */ char * path = "config/windows/toggle_order_and_active"; FILE * file = try_fopen(path, "r", f_name); uint16_t linemax = get_linemax(file, f_name); char win_order[linemax + 1]; try_fgets(win_order, linemax + 1, file, f_name); - - uint8_t a = 0; + uint8_t a; exit_trouble(read_uint8(file, &a), f_name, "read_uint8()"); - try_fclose(file, f_name); + /* Toggle windows and set active window selection. */ uint8_t i = 0; for (; i < strlen(win_order) - 1; i++) { @@ -407,7 +407,6 @@ extern void sorted_wintoggle_and_activate() continue; } toggle_window(win_order[i]); - if (a == (uint8_t) win_order[i]) { world.wmeta->active = get_win_by_id(win_order[i]); -- 2.30.2