summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2011-06-24 05:54:31 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2011-06-24 05:54:31 +0000
commitaac887da536ed5fc828ce2071d5e8a7edcba4597 (patch)
treef681ba044e0fd84b8779890ae553a38efbd108c6 /app
parentcd06f94a3647490827b92cbff63d14b931ca186f (diff)
more nitems usage.
ok oga@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/conf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index c04dd0d35..775ae2ccd 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/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.82 2011/06/24 05:45:57 okan Exp $
+ * $OpenBSD: conf.c,v 1.83 2011/06/24 05:54:30 okan Exp $
*/
#include <sys/param.h>
@@ -414,7 +414,6 @@ static struct {
{.i = (CWM_LEFT|CWM_PTRMOVE|CWM_BIGMOVE)} },
{ "bigptrmoveright", kbfunc_moveresize, 0,
{.i = (CWM_RIGHT|CWM_PTRMOVE|CWM_BIGMOVE)} },
- { NULL, NULL, 0, {0}},
};
/*
@@ -503,7 +502,7 @@ conf_bindname(struct conf *c, char *name, char *binding)
if (strcmp("unmap", binding) == 0)
return;
- for (iter = 0; name_to_kbfunc[iter].tag != NULL; iter++) {
+ for (iter = 0; iter < nitems(name_to_kbfunc); iter++) {
if (strcmp(name_to_kbfunc[iter].tag, binding) != 0)
continue;
@@ -558,7 +557,6 @@ static struct {
{ "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT },
{ "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT },
{ "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },
- { NULL, NULL, 0 },
};
void
@@ -594,7 +592,7 @@ conf_mousebind(struct conf *c, char *name, char *binding)
if (strcmp("unmap", binding) == 0)
return;
- for (iter = 0; name_to_mousefunc[iter].tag != NULL; iter++) {
+ for (iter = 0; iter < nitems(name_to_mousefunc); iter++) {
if (strcmp(name_to_mousefunc[iter].tag, binding) != 0)
continue;