diff options
author | okan <okan> | 2015-01-19 14:54:16 +0000 |
---|---|---|
committer | okan <okan> | 2015-01-19 14:54:16 +0000 |
commit | 7936b9b2a7c7c3cc06d3fb60c22ed535b610cd63 (patch) | |
tree | 9bb4f55aee479f2aa360ccc1dc07946b17ad09c5 /kbfunc.c | |
parent | c412f040df05c7221537a598786e0cea4b35167f (diff) | |
download | cwm-7936b9b2a7c7c3cc06d3fb60c22ed535b610cd63.tar.gz cwm-7936b9b2a7c7c3cc06d3fb60c22ed535b610cd63.tar.xz cwm-7936b9b2a7c7c3cc06d3fb60c22ed535b610cd63.zip |
Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX
and HOST_NAME_MAX+1, respectively. ok doug@
Diffstat (limited to 'kbfunc.c')
-rw-r--r-- | kbfunc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kbfunc.c b/kbfunc.c index c3be2f5..388ead7 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -18,12 +18,13 @@ * $OpenBSD$ */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/queue.h> #include <dirent.h> #include <err.h> #include <errno.h> +#include <limits.h> #include <paths.h> #include <signal.h> #include <stdio.h> @@ -238,7 +239,7 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg) #define NPATHS 256 struct screen_ctx *sc = cc->sc; char **ap, *paths[NPATHS], *path, *pathcpy; - char tpath[MAXPATHLEN]; + char tpath[PATH_MAX]; const char *label; DIR *dirp; struct dirent *dp; @@ -323,8 +324,8 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg) struct menu_q menuq; FILE *fp; char *buf, *lbuf, *p; - char hostbuf[MAXHOSTNAMELEN]; - char path[MAXPATHLEN]; + char hostbuf[HOST_NAME_MAX+1]; + char path[PATH_MAX]; int l; size_t len; |