aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorokan2012-11-07 21:01:48 +0000
committerokan2012-11-07 21:01:48 +0000
commit0bd14905e612391c672edf3787194ce894727178 (patch)
tree4c69deb5b5e3976ec1acfc37004fb676ecc765d2 /conf.c
parent4fa23f6f1162d9f4b48afb7905628a17e22322c1 (diff)
downloadcwm-0bd14905e612391c672edf3787194ce894727178.tar.gz
now that we have FOREACH_SAFE queue macros, use them where appropriate;
from Tiago Cunha.
Diffstat (limited to '')
-rw-r--r--conf.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/conf.c b/conf.c
index 196ade3..25813ad 100644
--- a/conf.c
+++ b/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: conf.c,v 1.104 2012/11/07 20:37:55 okan Exp $
+ * $OpenBSD: conf.c,v 1.105 2012/11/07 21:01:48 okan Exp $
*/
#include <sys/param.h>
@@ -512,10 +512,7 @@ conf_unbind(struct conf *c, struct keybinding *unbind)
{
struct keybinding *key = NULL, *keynxt;
- for (key = TAILQ_FIRST(&c->keybindingq);
- key != TAILQ_END(&c->keybindingq); key = keynxt) {
- keynxt = TAILQ_NEXT(key, entry);
-
+ TAILQ_FOREACH_SAFE(key, &c->keybindingq, entry, keynxt) {
if (key->modmask != unbind->modmask)
continue;
@@ -597,10 +594,7 @@ conf_mouseunbind(struct conf *c, struct mousebinding *unbind)
{
struct mousebinding *mb = NULL, *mbnxt;
- for (mb = TAILQ_FIRST(&c->mousebindingq);
- mb != TAILQ_END(&c->mousebindingq); mb = mbnxt) {
- mbnxt = TAILQ_NEXT(mb, entry);
-
+ TAILQ_FOREACH_SAFE(mb, &c->mousebindingq, entry, mbnxt) {
if (mb->modmask != unbind->modmask)
continue;