Don't reuse index variable.

pull/1/head
Nicholas Marriott 2009-01-27 19:40:56 +00:00
parent 9cde0c2477
commit a239d80e88
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.111 2009-01-21 22:47:31 nicm Exp $ */ /* $Id: server.c,v 1.112 2009-01-27 19:40:56 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -763,7 +763,7 @@ server_handle_window(struct window *w, struct window_pane *wp)
{ {
struct session *s; struct session *s;
struct client *c; struct client *c;
u_int i; u_int i, j;
int action, update; int action, update;
window_pane_parse(wp); window_pane_parse(wp);
@ -786,8 +786,8 @@ server_handle_window(struct window *w, struct window_pane *wp)
case BELL_ANY: case BELL_ANY:
if (s->flags & SESSION_UNATTACHED) if (s->flags & SESSION_UNATTACHED)
break; break;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
c = ARRAY_ITEM(&clients, i); c = ARRAY_ITEM(&clients, j);
if (c != NULL && c->session == s) if (c != NULL && c->session == s)
tty_putcode(&c->tty, TTYC_BEL); tty_putcode(&c->tty, TTYC_BEL);
} }
@ -795,8 +795,8 @@ server_handle_window(struct window *w, struct window_pane *wp)
case BELL_CURRENT: case BELL_CURRENT:
if (w->active != wp) if (w->active != wp)
break; break;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
c = ARRAY_ITEM(&clients, i); c = ARRAY_ITEM(&clients, j);
if (c != NULL && c->session == s) if (c != NULL && c->session == s)
tty_putcode(&c->tty, TTYC_BEL); tty_putcode(&c->tty, TTYC_BEL);
} }