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/rcs/rcsutil.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/rcs/rcsutil.c')
-rw-r--r-- | usr.bin/rcs/rcsutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c index f27cf467e3e..258e5ed76af 100644 --- a/usr.bin/rcs/rcsutil.c +++ b/usr.bin/rcs/rcsutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsutil.c,v 1.42 2014/12/01 21:58:46 deraadt Exp $ */ +/* $OpenBSD: rcsutil.c,v 1.43 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -154,8 +154,8 @@ rcs_choosefile(const char *filename, char *out, size_t len) { int fd; struct stat sb; - char *p, *ext, name[MAXPATHLEN], *next, *ptr, rcsdir[MAXPATHLEN], - *suffixes, rcspath[MAXPATHLEN]; + char *p, *ext, name[PATH_MAX], *next, *ptr, rcsdir[PATH_MAX], + *suffixes, rcspath[PATH_MAX]; /* * If `filename' contains a directory, `rcspath' contains that @@ -215,7 +215,7 @@ rcs_choosefile(const char *filename, char *out, size_t len) */ suffixes = xstrdup(rcs_suffixes); for (next = suffixes; (ext = strsep(&next, "/")) != NULL;) { - char fpath[MAXPATHLEN]; + char fpath[PATH_MAX]; if ((p = strrchr(rcspath, ',')) != NULL) { if (!strcmp(p, ext)) { |