summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2011-06-24 05:54:30 +0000
committerokan <okan>2011-06-24 05:54:30 +0000
commitd39f5b9183121f3d127964f68f18a220adf97d01 (patch)
tree2aa412a735e771fdd610ec6ca335aee9ece983d4 /conf.c
parentc8ea76a9657c6e70d9bd2198639076e2235a4ea2 (diff)
downloadcwm-d39f5b9183121f3d127964f68f18a220adf97d01.tar.gz
cwm-d39f5b9183121f3d127964f68f18a220adf97d01.tar.xz
cwm-d39f5b9183121f3d127964f68f18a220adf97d01.zip
more nitems usage.
ok oga@
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/conf.c b/conf.c
index 06352ab..a7e2631 100644
--- a/conf.c
+++ b/conf.c
@@ -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;