diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-30 22:27:58 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-20 18:52:16 +0300 |
| commit | d6d3de3788a4e5bab4e751fedcd241f29cbf4bb8 (patch) | |
| tree | 3bf72c3f3ac920f30958764a015855c226cb2910 /monsterwm.c | |
| parent | fdaab55052eb25591e8736bb7f1fccff97d0d4e7 (diff) | |
rework prevclient function - negate return conditional
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
