diff options
author | okan | 2009-06-20 00:55:41 +0000 |
---|---|---|
committer | okan | 2009-06-20 00:55:41 +0000 |
commit | c54416ae163702858ce97808753af16c8c9b5921 (patch) | |
tree | e9d3394584e6cb28ee5e25f556f7ce000bb9cdc6 /group.c | |
parent | c6af5e9b967797d315037b26aa05fec5b3e6ef44 (diff) | |
download | cwm-c54416ae163702858ce97808753af16c8c9b5921.tar.gz |
compact a bit by condensing a few if-else's; from Thomas Pfaff
"go on then" oga@
Diffstat (limited to 'group.c')
-rw-r--r-- | group.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: group.c,v 1.31 2009/06/20 00:22:39 okan Exp $ + * $Id: group.c,v 1.32 2009/06/20 00:55:42 okan Exp $ */ #include "headers.h" @@ -325,10 +325,7 @@ group_menu(XButtonEvent *e) gc = (struct group_ctx *)mi->ctx; - if (gc->hidden) - group_show(gc); - else - group_hide(gc); + (gc->hidden) ? group_show(gc) : group_hide(gc); cleanup: while ((mi = TAILQ_FIRST(&menuq)) != NULL) { @@ -349,10 +346,7 @@ group_alltoggle(void) group_hide(&Groups[i]); } - if (Grouphideall) - Grouphideall = 0; - else - Grouphideall = 1; + Grouphideall = (Grouphideall) ? 0 : 1; } void |