=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- src/usr.bin/tmux/status.c 2009/07/14 19:11:58 1.8 +++ src/usr.bin/tmux/status.c 2009/07/15 07:50:34 1.9 @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.8 2009/07/14 19:11:58 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.9 2009/07/15 07:50:34 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -898,7 +898,7 @@ const struct set_option_entry *optent; ARRAY_DECL(, const char *) list; char *prefix, *s2; - u_int i; + u_int i; size_t j; if (*s == '\0') @@ -910,13 +910,11 @@ if (strncmp((*cmdent)->name, s, strlen(s)) == 0) ARRAY_ADD(&list, (*cmdent)->name); } - for (i = 0; i < NSETOPTION; i++) { - optent = &set_option_table[i]; + for (optent = set_option_table; optent->name != NULL; optent++) { if (strncmp(optent->name, s, strlen(s)) == 0) ARRAY_ADD(&list, optent->name); } - for (i = 0; i < NSETWINDOWOPTION; i++) { - optent = &set_window_option_table[i]; + for (optent = set_window_option_table; optent->name != NULL; optent++) { if (strncmp(optent->name, s, strlen(s)) == 0) ARRAY_ADD(&list, optent->name); }