simplification
authorAnselm R. Garbe <arg@suckless.org>
Tue, 15 May 2007 12:06:18 +0000 (14:06 +0200)
committerAnselm R. Garbe <arg@suckless.org>
Tue, 15 May 2007 12:06:18 +0000 (14:06 +0200)
layout.c

index 5bb6e97..bc5ca1c 100644 (file)
--- a/layout.c
+++ b/layout.c
@@ -218,10 +218,8 @@ setlayout(const char *arg) {
 
 void
 togglebar(const char *arg) {
-       if(bpos == BarOff) {
-               if((bpos = BARPOS) == BarOff)
-                       bpos = BarTop;
-       }
+       if(bpos == BarOff)
+               bpos = (BARPOS == BarOff) ? BarTop : BARPOS;
        else
                bpos = BarOff;
        updatebarpos();