removed unused variable nitem. 015f51ac
sander@localhost · 2008-03-23 12:09 1 file(s) · +3 −11
dmenu.c +3 −11
76 76
unsigned int cmdw = 0;
77 77
unsigned int mw, mh;
78 78
unsigned int promptw = 0;
79 -
unsigned int nitem = 0;
80 79
unsigned int numlockmask = 0;
81 80
Bool running = True;
82 81
Display *dpy;
524 523
		return;
525 524
	plen = strlen(pattern);
526 525
	item = lexact = lprefix = lsubstr = itemend = exactend = prefixend = substrend = NULL;
527 -
	nitem = 0;
528 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 528
			appenditem(i, &lexact, &exactend);
531 -
			nitem++;
532 -
		}
533 -
		else if(!fstrncmp(pattern, i->text, plen)) {
529 +
		else if(!fstrncmp(pattern, i->text, plen))
534 530
			appenditem(i, &lprefix, &prefixend);
535 -
			nitem++;
536 -
		}
537 -
		else if(fstrstr(i->text, pattern)) {
531 +
		else if(fstrstr(i->text, pattern))
538 532
			appenditem(i, &lsubstr, &substrend);
539 -
			nitem++;
540 -
		}
541 533
	if(lexact) {
542 534
		item = lexact;
543 535
		itemend = exactend;