From d6d3de3788a4e5bab4e751fedcd241f29cbf4bb8 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sat, 30 Jun 2012 22:27:58 +0300 Subject: rework prevclient function - negate return conditional --- monsterwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'monsterwm.c') diff --git a/monsterwm.c b/monsterwm.c index 6ac0dab..0c55e0d 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -666,8 +666,8 @@ void next_win(void) { /* get the previous client from the given * if no such client, return NULL */ Client* prevclient(Client *c) { - if (!c || !head->next) return NULL; - Client *p; for (p = head; p->next && p->next != c; p = p->next); + Client *p = NULL; + if (c && head->next) for (p = head; p->next && p->next != c; p = p->next); return p; } -- cgit v1.3.1