about summary refs log tree commit diff
path: root/dmenu.c
diff options
context:
space:
mode:
authorsander@localhost <unknown>2008-03-23 12:09:29 +0100
committersander@localhost <unknown>2008-03-23 12:09:29 +0100
commit015f51ac46adac6befd81754a8f01676eaf1f6a4 (patch)
tree9a13f199bb4aee41d0d983bfa9c74e7dcb657ba3 /dmenu.c
parentseveral performance tweaks (diff)
downloaddmenu-015f51ac46adac6befd81754a8f01676eaf1f6a4.tar.gz
dmenu-015f51ac46adac6befd81754a8f01676eaf1f6a4.tar.bz2
dmenu-015f51ac46adac6befd81754a8f01676eaf1f6a4.zip
removed unused variable nitem.
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/dmenu.c b/dmenu.c
index 5191a20..b07671c 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -76,7 +76,6 @@ int ret = 0;
 unsigned int cmdw = 0;
 unsigned int mw, mh;
 unsigned int promptw = 0;
-unsigned int nitem = 0;
 unsigned int numlockmask = 0;
 Bool running = True;
 Display *dpy;
@@ -524,20 +523,13 @@ match(char *pattern) {
 		return;
 	plen = strlen(pattern);
 	item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL;
-	nitem = 0;
 	for(i = allitems; i; i = i->next)
-		if(!fstrncmp(pattern, i->text, plen + 1)) {
+		if(!fstrncmp(pattern, i->text, plen + 1))
 			appenditem(i, &lexact, &exactend);
-			nitem++;
-		}
-		else if(!fstrncmp(pattern, i->text, plen)) {
+		else if(!fstrncmp(pattern, i->text, plen))
 			appenditem(i, &lprefix, &prefixend);
-			nitem++;
-		}
-		else if(fstrstr(i->text, pattern)) {
+		else if(fstrstr(i->text, pattern))
 			appenditem(i, &lsubstr, &substrend);
-			nitem++;
-		}
 	if(lexact) {
 		item = lexact;
 		itemend = exactend;