diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2015-01-19 14:54:17 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2015-01-19 14:54:17 +0000 |
commit | 0c730e4a673c72964e2d307b136fa9c80c26b2fe (patch) | |
tree | 324c818f1d34934863bad4dbc567fbba7132356e /app/cwm/search.c | |
parent | 5d5975a6f5c35d84dbfb5d5b769329c81ec2d221 (diff) |
Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX
and HOST_NAME_MAX+1, respectively.
ok doug@
Diffstat (limited to 'app/cwm/search.c')
-rw-r--r-- | app/cwm/search.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/cwm/search.c b/app/cwm/search.c index 7e55a51cb..0acfd2c9a 100644 --- a/app/cwm/search.c +++ b/app/cwm/search.c @@ -15,10 +15,10 @@ * 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.41 2014/09/15 13:00:49 okan Exp $ + * $OpenBSD: search.c,v 1.42 2015/01/19 14:54:16 okan Exp $ */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/queue.h> #include <assert.h> @@ -26,6 +26,7 @@ #include <errno.h> #include <fnmatch.h> #include <glob.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -172,7 +173,7 @@ search_print_client(struct menu *mi, int list) static void search_match_path(struct menu_q *menuq, struct menu_q *resultq, char *search, int flag) { - char pattern[MAXPATHLEN]; + char pattern[PATH_MAX]; glob_t g; int i; |