=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/notify.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/tmux/notify.c 2012/09/25 07:41:22 1.5 +++ src/usr.bin/tmux/notify.c 2015/04/24 23:17:11 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: notify.c,v 1.5 2012/09/25 07:41:22 nicm Exp $ */ +/* $OpenBSD: notify.c,v 1.6 2015/04/24 23:17:11 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman @@ -136,7 +136,6 @@ notify_input(struct window_pane *wp, struct evbuffer *input) { struct client *c; - u_int i; /* * notify_input() is not queued and only does anything when @@ -145,9 +144,8 @@ if (!notify_enabled) return; - for (i = 0; i < ARRAY_LENGTH(&clients); i++) { - c = ARRAY_ITEM(&clients, i); - if (c != NULL && (c->flags & CLIENT_CONTROL)) + TAILQ_FOREACH(c, &clients, entry) { + if (c->flags & CLIENT_CONTROL) control_notify_input(c, wp, input); } }