diff options
author | okan <okan> | 2013-03-09 21:55:56 +0000 |
---|---|---|
committer | okan <okan> | 2013-03-09 21:55:56 +0000 |
commit | cfc19dba7e48ca1afeaf5a910c2591d8f32c2547 (patch) | |
tree | 3d1e59501cd717bd6cb2f2ed36c5796b989cf432 | |
parent | 9c6226faa81835067769d042f52520d01af0b70f (diff) | |
parent | fbb0df415528094cb7ead17ad3a50dcf6fba6008 (diff) | |
download | cwm-cfc19dba7e48ca1afeaf5a910c2591d8f32c2547.tar.gz cwm-cfc19dba7e48ca1afeaf5a910c2591d8f32c2547.tar.xz cwm-cfc19dba7e48ca1afeaf5a910c2591d8f32c2547.zip |
cvsimport
-rw-r--r-- | search.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/search.c b/search.c index 815f6bb..b74c2ef 100644 --- a/search.c +++ b/search.c @@ -223,9 +223,8 @@ search_match_exec(struct menu_q *menuq, struct menu_q *resultq, char *search) TAILQ_FOREACH(mi, menuq, entry) { if (strsubmatch(search, mi->text, 1) == 0 && fnmatch(search, mi->text, 0) == FNM_NOMATCH) - continue; - for (mj = TAILQ_FIRST(resultq); mj != NULL; - mj = TAILQ_NEXT(mj, resultentry)) { + continue; + TAILQ_FOREACH(mj, resultq, resultentry) { if (strcasecmp(mi->text, mj->text) < 0) { TAILQ_INSERT_BEFORE(mj, mi, resultentry); break; |