removed unused variable nitem.
This commit is contained in:
parent
542c58d8d0
commit
015f51ac46
14
dmenu.c
14
dmenu.c
|
@ -76,7 +76,6 @@ int ret = 0;
|
||||||
unsigned int cmdw = 0;
|
unsigned int cmdw = 0;
|
||||||
unsigned int mw, mh;
|
unsigned int mw, mh;
|
||||||
unsigned int promptw = 0;
|
unsigned int promptw = 0;
|
||||||
unsigned int nitem = 0;
|
|
||||||
unsigned int numlockmask = 0;
|
unsigned int numlockmask = 0;
|
||||||
Bool running = True;
|
Bool running = True;
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
@ -524,20 +523,13 @@ match(char *pattern) {
|
||||||
return;
|
return;
|
||||||
plen = strlen(pattern);
|
plen = strlen(pattern);
|
||||||
item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL;
|
item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL;
|
||||||
nitem = 0;
|
|
||||||
for(i = allitems; i; i = i->next)
|
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);
|
appenditem(i, &lexact, &exactend);
|
||||||
nitem++;
|
else if(!fstrncmp(pattern, i->text, plen))
|
||||||
}
|
|
||||||
else if(!fstrncmp(pattern, i->text, plen)) {
|
|
||||||
appenditem(i, &lprefix, &prefixend);
|
appenditem(i, &lprefix, &prefixend);
|
||||||
nitem++;
|
else if(fstrstr(i->text, pattern))
|
||||||
}
|
|
||||||
else if(fstrstr(i->text, pattern)) {
|
|
||||||
appenditem(i, &lsubstr, &substrend);
|
appenditem(i, &lsubstr, &substrend);
|
||||||
nitem++;
|
|
||||||
}
|
|
||||||
if(lexact) {
|
if(lexact) {
|
||||||
item = lexact;
|
item = lexact;
|
||||||
itemend = exactend;
|
itemend = exactend;
|
||||||
|
|
Loading…
Reference in a new issue