aboutsummaryrefslogtreecommitdiff
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
parent542c58d8d00e26f23a5e0f09a9d1e68a7259db5e (diff)
removed unused variable nitem.
-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;
76unsigned int cmdw = 0; 76unsigned int cmdw = 0;
77unsigned int mw, mh; 77unsigned int mw, mh;
78unsigned int promptw = 0; 78unsigned int promptw = 0;
79unsigned int nitem = 0;
80unsigned int numlockmask = 0; 79unsigned int numlockmask = 0;
81Bool running = True; 80Bool running = True;
82Display *dpy; 81Display *dpy;
@@ -524,20 +523,13 @@ match(char *pattern) {
524 return; 523 return;
525 plen = strlen(pattern); 524 plen = strlen(pattern);
526 item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL; 525 item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL;
527 nitem = 0;
528 for(i = allitems; i; i = i->next) 526 for(i = allitems; i; i = i->next)
529 if(!fstrncmp(pattern, i->text, plen + 1)) { 527 if(!fstrncmp(pattern, i->text, plen + 1))
530 appenditem(i, &lexact, &exactend); 528 appenditem(i, &lexact, &exactend);
531 nitem++; 529 else if(!fstrncmp(pattern, i->text, plen))
532 }
533 else if(!fstrncmp(pattern, i->text, plen)) {
534 appenditem(i, &lprefix, &prefixend); 530 appenditem(i, &lprefix, &prefixend);
535 nitem++; 531 else if(fstrstr(i->text, pattern))
536 }
537 else if(fstrstr(i->text, pattern)) {
538 appenditem(i, &lsubstr, &substrend); 532 appenditem(i, &lsubstr, &substrend);
539 nitem++;
540 }
541 if(lexact) { 533 if(lexact) {
542 item = lexact; 534 item = lexact;
543 itemend = exactend; 535 itemend = exactend;