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/cvs/util.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/cvs/util.c')
| -rw-r--r-- | usr.bin/cvs/util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 3d6b0948aab..747c28346fd 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.156 2014/12/01 21:58:46 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.157 2015/01/16 06:40:07 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -366,7 +366,7 @@ cvs_rmdir(const char *path) DIR *dirp; struct dirent *ent; struct stat st; - char fpath[MAXPATHLEN]; + char fpath[PATH_MAX]; if (cvs_server_active == 0) cvs_log(LP_TRACE, "cvs_rmdir(%s)", path); @@ -444,7 +444,7 @@ done: void cvs_get_repository_path(const char *dir, char *dst, size_t len) { - char buf[MAXPATHLEN]; + char buf[PATH_MAX]; cvs_get_repository_name(dir, buf, sizeof(buf)); (void)xsnprintf(dst, len, "%s/%s", current_cvsroot->cr_dir, buf); @@ -455,7 +455,7 @@ void cvs_get_repository_name(const char *dir, char *dst, size_t len) { FILE *fp; - char fpath[MAXPATHLEN]; + char fpath[PATH_MAX]; dst[0] = '\0'; @@ -501,7 +501,7 @@ cvs_mkadmin(const char *path, const char *root, const char *repo, { FILE *fp; int fd; - char buf[MAXPATHLEN]; + char buf[PATH_MAX]; struct hash_data *hdata, hd; hdata = hash_table_find(&created_cvs_directories, path, strlen(path)); @@ -565,7 +565,7 @@ cvs_mkpath(const char *path, char *tag) FILE *fp; size_t len; struct hash_data *hdata, hd; - char *entry, *sp, *dp, *dir, *p, rpath[MAXPATHLEN], repo[MAXPATHLEN]; + char *entry, *sp, *dp, *dir, *p, rpath[PATH_MAX], repo[PATH_MAX]; hdata = hash_table_find(&created_directories, path, strlen(path)); if (hdata != NULL) @@ -662,7 +662,7 @@ void cvs_mkdir(const char *path, mode_t mode) { size_t len; - char *sp, *dp, *dir, rpath[MAXPATHLEN]; + char *sp, *dp, *dir, rpath[PATH_MAX]; if (current_cvsroot->cr_method != CVS_METHOD_LOCAL || cvs_server_active == 1) |
