diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-11-16 04:49:50 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-11-16 04:49:50 +0000 |
commit | f2273a76226705a4e8f5e015d1835449da4e3242 (patch) | |
tree | 9aa8ab3b6fae60c8e2a7a05923b9b6f239d3f864 /games/hack | |
parent | 3243c629699c25f7f4a576fe1c2f58e274eba8f7 (diff) |
Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,
and <sys/ttydefaults.h>
Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX
Pull in <limits.h> where needed
Prefer sizeof(var) over MAXFOO or FOO_MAX
ok deraadt@
Diffstat (limited to 'games/hack')
-rw-r--r-- | games/hack/hack.unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c index 8017b810cb1..18502de172c 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.unix.c,v 1.14 2009/10/27 23:59:25 deraadt Exp $ */ +/* $OpenBSD: hack.unix.c,v 1.15 2014/11/16 04:49:48 guenther Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -74,11 +74,11 @@ #include <sys/types.h> /* for time_t and stat */ #include <sys/stat.h> -#include <sys/param.h> #include <sys/time.h> #include <err.h> #include <errno.h> +#include <limits.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -156,7 +156,7 @@ void gethdate(char *name) { char *p, *np, *path; - char filename[MAXPATHLEN+1]; + char filename[PATH_MAX+1]; if (strchr(name, '/') != NULL || (p = getenv("PATH")) == NULL) p = ""; |