summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2009-01-11 21:33:46 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2009-01-11 21:33:46 +0000
commit0277fd4dfa3d529beb001d841395e22bcb1e1d08 (patch)
tree19dd75a49e0efe624165f7af6ef5d4e875b0d896 /app
parent932ce67e0ddf692e388828a1c21fb27d4d361e1d (diff)
better comparison idiom; found with -Wall
ok oga@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/parse.y22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/cwm/parse.y b/app/cwm/parse.y
index e80c1cbba..194185f65 100644
--- a/app/cwm/parse.y
+++ b/app/cwm/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.13 2008/06/16 19:09:48 mk Exp $ */
+/* $OpenBSD: parse.y,v 1.14 2009/01/11 21:33:45 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -471,17 +471,17 @@ conf_clear(struct conf *c)
struct cmd *cmd;
struct mousebinding *mb;
- while (cmd = TAILQ_FIRST(&c->cmdq)) {
+ while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
TAILQ_REMOVE(&c->cmdq, cmd, entry);
free(cmd);
}
- while (kb = TAILQ_FIRST(&c->keybindingq)) {
+ while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
TAILQ_REMOVE(&c->keybindingq, kb, entry);
free(kb);
}
- while (ag = TAILQ_FIRST(&c->autogroupq)) {
+ while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
TAILQ_REMOVE(&c->autogroupq, ag, entry);
free(ag->class);
if (ag->name)
@@ -490,12 +490,12 @@ conf_clear(struct conf *c)
free(ag);
}
- while (wm = TAILQ_FIRST(&c->ignoreq)) {
+ while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
TAILQ_REMOVE(&c->ignoreq, wm, entry);
free(wm);
}
- while (mb = TAILQ_FIRST(&c->mousebindingq)) {
+ while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
TAILQ_REMOVE(&c->mousebindingq, mb, entry);
free(mb);
}
@@ -541,27 +541,27 @@ parse_config(const char *filename, struct conf *xconf)
xconf->flags = conf->flags;
- while (cmd = TAILQ_FIRST(&conf->cmdq)) {
+ while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) {
TAILQ_REMOVE(&conf->cmdq, cmd, entry);
TAILQ_INSERT_TAIL(&xconf->cmdq, cmd, entry);
}
- while (kb = TAILQ_FIRST(&conf->keybindingq)) {
+ while ((kb = TAILQ_FIRST(&conf->keybindingq)) != NULL) {
TAILQ_REMOVE(&conf->keybindingq, kb, entry);
TAILQ_INSERT_TAIL(&xconf->keybindingq, kb, entry);
}
- while (ag = TAILQ_FIRST(&conf->autogroupq)) {
+ while ((ag = TAILQ_FIRST(&conf->autogroupq)) != NULL) {
TAILQ_REMOVE(&conf->autogroupq, ag, entry);
TAILQ_INSERT_TAIL(&xconf->autogroupq, ag, entry);
}
- while (wm = TAILQ_FIRST(&conf->ignoreq)) {
+ while ((wm = TAILQ_FIRST(&conf->ignoreq)) != NULL) {
TAILQ_REMOVE(&conf->ignoreq, wm, entry);
TAILQ_INSERT_TAIL(&xconf->ignoreq, wm, entry);
}
- while (mb = TAILQ_FIRST(&conf->mousebindingq)) {
+ while ((mb = TAILQ_FIRST(&conf->mousebindingq)) != NULL) {
TAILQ_REMOVE(&conf->mousebindingq, mb, entry);
TAILQ_INSERT_TAIL(&xconf->mousebindingq, mb, entry);
}