diff options
| author | 2015-01-16 06:39:28 +0000 | |
|---|---|---|
| committer | 2015-01-16 06:39:28 +0000 | |
| commit | b9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch) | |
| tree | 72b2433e418dfa1aef5fcf8305617b97979a25d8 /usr.bin/vi/ex/ex_init.c | |
| parent | improve checksum parsing slightly. now handles filenames with spaces. (diff) | |
| download | wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip | |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.bin/vi/ex/ex_init.c')
| -rw-r--r-- | usr.bin/vi/ex/ex_init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/vi/ex/ex_init.c b/usr.bin/vi/ex/ex_init.c index f850b118cc7..86effa05ac7 100644 --- a/usr.bin/vi/ex/ex_init.c +++ b/usr.bin/vi/ex/ex_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_init.c,v 1.13 2014/11/12 16:29:04 millert Exp $ */ +/* $OpenBSD: ex_init.c,v 1.14 2015/01/16 06:40:14 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -11,7 +11,6 @@ #include "config.h" -#include <sys/param.h> #include <sys/queue.h> #include <sys/stat.h> @@ -135,7 +134,7 @@ int ex_exrc(SCR *sp) { struct stat hsb, lsb; - char *p, path[MAXPATHLEN]; + char *p, path[PATH_MAX]; int fd; /* @@ -344,7 +343,7 @@ exrc_isok(SCR *sp, struct stat *sbp, int *fdp, char *path, int rootown, enum { ROOTOWN, OWN, WRITER } etype; uid_t euid; int nf1, nf2; - char *a, *b, buf[MAXPATHLEN]; + char *a, *b, buf[PATH_MAX]; if ((*fdp = open(path, O_RDONLY, 0)) < 0) { if (errno == ENOENT) |
