mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
now that we have FOREACH_SAFE queue macros, use them where appropriate;
from Tiago Cunha.
This commit is contained in:
parent
bd25218333
commit
7f1851b8f6
10
conf.c
10
conf.c
@ -512,10 +512,7 @@ conf_unbind(struct conf *c, struct keybinding *unbind)
|
|||||||
{
|
{
|
||||||
struct keybinding *key = NULL, *keynxt;
|
struct keybinding *key = NULL, *keynxt;
|
||||||
|
|
||||||
for (key = TAILQ_FIRST(&c->keybindingq);
|
TAILQ_FOREACH_SAFE(key, &c->keybindingq, entry, keynxt) {
|
||||||
key != TAILQ_END(&c->keybindingq); key = keynxt) {
|
|
||||||
keynxt = TAILQ_NEXT(key, entry);
|
|
||||||
|
|
||||||
if (key->modmask != unbind->modmask)
|
if (key->modmask != unbind->modmask)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -597,10 +594,7 @@ conf_mouseunbind(struct conf *c, struct mousebinding *unbind)
|
|||||||
{
|
{
|
||||||
struct mousebinding *mb = NULL, *mbnxt;
|
struct mousebinding *mb = NULL, *mbnxt;
|
||||||
|
|
||||||
for (mb = TAILQ_FIRST(&c->mousebindingq);
|
TAILQ_FOREACH_SAFE(mb, &c->mousebindingq, entry, mbnxt) {
|
||||||
mb != TAILQ_END(&c->mousebindingq); mb = mbnxt) {
|
|
||||||
mbnxt = TAILQ_NEXT(mb, entry);
|
|
||||||
|
|
||||||
if (mb->modmask != unbind->modmask)
|
if (mb->modmask != unbind->modmask)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user