mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
better comparison idiom; found with -Wall
ok oga@
This commit is contained in:
parent
590169ce24
commit
0aca400461
20
parse.y
20
parse.y
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user