diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-10-23 00:39:30 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-10-23 00:39:30 -0700 |
commit | 2f717227620d6cbae7d7da2a16a7fe4002220858 (patch) | |
tree | a4e094e6b08531ff2f646c0d6717daf504fb5b89 /src/window.c | |
parent | b6c2b5befcdb209eaa8e6d27cc95849f9df13728 (diff) |
window: trivial simplification of vwm_win_lookup()
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index 29cc32b..bffbfe5 100644 --- a/src/window.c +++ b/src/window.c @@ -67,16 +67,14 @@ void vwm_win_mru(vwm_t *vwm, vwm_window_t *vwin) /* look up the X window in the global managed windows list */ vwm_window_t * vwm_win_lookup(vwm_t *vwm, Window win) { - vwm_window_t *tmp, *vwin = NULL; + vwm_window_t *tmp; list_for_each_entry(tmp, &vwm->windows_mru, windows_mru) { - if (tmp->xwindow->id == win) { - vwin = tmp; - break; - } + if (tmp->xwindow->id == win) + return tmp; } - return vwin; + return NULL; } |