summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/cvs.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /usr.bin/cvs/cvs.c
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-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/cvs/cvs.c')
-rw-r--r--usr.bin/cvs/cvs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index 15210e015f3..912be1af66d 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.154 2014/12/01 21:58:46 deraadt Exp $ */
+/* $OpenBSD: cvs.c,v 1.155 2015/01/16 06:40:07 deraadt Exp $ */
/*
* Copyright (c) 2006, 2007 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -184,7 +184,7 @@ main(int argc, char **argv)
int i, ret, cmd_argc;
struct passwd *pw;
struct stat st;
- char fpath[MAXPATHLEN];
+ char fpath[PATH_MAX];
tzset();
@@ -426,7 +426,7 @@ cvs_getopt(int argc, char **argv)
static void
cvs_read_rcfile(void)
{
- char rcpath[MAXPATHLEN], *buf, *lbuf, *lp, *p;
+ char rcpath[PATH_MAX], *buf, *lbuf, *lp, *p;
int cmd_parsed, cvs_parsed, i, linenum;
size_t len, pos;
struct cvs_cmd *tcmdp;
@@ -434,8 +434,8 @@ cvs_read_rcfile(void)
linenum = 0;
- i = snprintf(rcpath, MAXPATHLEN, "%s/%s", cvs_homedir, CVS_PATH_RC);
- if (i < 0 || i >= MAXPATHLEN) {
+ i = snprintf(rcpath, PATH_MAX, "%s/%s", cvs_homedir, CVS_PATH_RC);
+ if (i < 0 || i >= PATH_MAX) {
cvs_log(LP_ERRNO, "%s", rcpath);
return;
}