diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-27 19:40:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-27 19:40:56 +0000 |
commit | a239d80e884abdbd575f011ab13c76211274d1c1 (patch) | |
tree | 538d50ce63d2b9b8674a21a82fbc7e40b98a2fc1 | |
parent | 9cde0c24779e8f43b6d122bc62fa22b6022d9ef0 (diff) | |
download | rtmux-a239d80e884abdbd575f011ab13c76211274d1c1.tar.gz rtmux-a239d80e884abdbd575f011ab13c76211274d1c1.tar.bz2 rtmux-a239d80e884abdbd575f011ab13c76211274d1c1.zip |
Don't reuse index variable.
-rw-r--r-- | server.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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> @@ -763,7 +763,7 @@ server_handle_window(struct window *w, struct window_pane *wp) { struct session *s; struct client *c; - u_int i; + u_int i, j; int action, update; window_pane_parse(wp); @@ -786,8 +786,8 @@ server_handle_window(struct window *w, struct window_pane *wp) case BELL_ANY: if (s->flags & SESSION_UNATTACHED) break; - for (i = 0; i < ARRAY_LENGTH(&clients); i++) { - c = ARRAY_ITEM(&clients, i); + for (j = 0; j < ARRAY_LENGTH(&clients); j++) { + c = ARRAY_ITEM(&clients, j); if (c != NULL && c->session == s) tty_putcode(&c->tty, TTYC_BEL); } @@ -795,8 +795,8 @@ server_handle_window(struct window *w, struct window_pane *wp) case BELL_CURRENT: if (w->active != wp) break; - for (i = 0; i < ARRAY_LENGTH(&clients); i++) { - c = ARRAY_ITEM(&clients, i); + for (j = 0; j < ARRAY_LENGTH(&clients); j++) { + c = ARRAY_ITEM(&clients, j); if (c != NULL && c->session == s) tty_putcode(&c->tty, TTYC_BEL); } |