diff options
Diffstat (limited to 'search.c')
-rw-r--r-- | search.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: search.c,v 1.59 2016/12/06 21:54:10 okan Exp $ + * $OpenBSD: search.c,v 1.60 2017/04/24 13:35:25 okan Exp $ */ #include <sys/types.h> @@ -152,8 +152,6 @@ search_match_path_type(struct menu_q *menuq, struct menu_q *resultq, glob_t g; int i; - TAILQ_INIT(resultq); - (void)strlcpy(pattern, search, sizeof(pattern)); (void)strlcat(pattern, "*", sizeof(pattern)); @@ -170,6 +168,8 @@ search_match_path_type(struct menu_q *menuq, struct menu_q *resultq, void 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)); } |