From 69c7524909cec83591a6cea56722753922d9999a Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 19 Jan 2015 14:54:16 +0000 Subject: Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX and HOST_NAME_MAX+1, respectively. ok doug@ --- kbfunc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index d5afd1f..e6798f9 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -15,15 +15,16 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: kbfunc.c,v 1.104 2014/09/27 19:04:32 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.105 2015/01/19 14:54:16 okan Exp $ */ -#include +#include #include #include #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3-2-gb3c3