mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Move queue init to caller so it's only called once in a few cases.
This commit is contained in:
parent
15a6fcc851
commit
56b44257a5
4
search.c
4
search.c
@ -152,8 +152,6 @@ search_match_path_type(struct menu_q *menuq, struct menu_q *resultq,
|
|||||||
glob_t g;
|
glob_t g;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TAILQ_INIT(resultq);
|
|
||||||
|
|
||||||
(void)strlcpy(pattern, search, sizeof(pattern));
|
(void)strlcpy(pattern, search, sizeof(pattern));
|
||||||
(void)strlcat(pattern, "*", sizeof(pattern));
|
(void)strlcat(pattern, "*", sizeof(pattern));
|
||||||
|
|
||||||
@ -170,6 +168,8 @@ search_match_path_type(struct menu_q *menuq, struct menu_q *resultq,
|
|||||||
void
|
void
|
||||||
search_match_path(struct menu_q *menuq, struct menu_q *resultq, char *search)
|
search_match_path(struct menu_q *menuq, struct menu_q *resultq, char *search)
|
||||||
{
|
{
|
||||||
|
TAILQ_INIT(resultq);
|
||||||
|
|
||||||
return(search_match_path_type(menuq, resultq, search, PATH_ANY));
|
return(search_match_path_type(menuq, resultq, search, PATH_ANY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user