diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-11-28 19:28:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-11-28 19:28:43 +0000 |
commit | 0a2b352b03317e999da1f6267e4f52c363714806 (patch) | |
tree | 4739c20bbb0e68615f4c3a44921e5c5a2755c787 /usr.bin/xinstall | |
parent | 3401a7779d41e9ec5b75640de44fd2872b30d820 (diff) |
Stop using MAXBSIZE to eliminate sys/param.h including (which injects a
ton of namespace intrusion). Create local sizes, and refactor some code
along the way.
ok millert
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index b53b7d900d2..db534bc74be 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xinstall.c,v 1.75 2021/10/24 21:24:18 deraadt Exp $ */ +/* $OpenBSD: xinstall.c,v 1.76 2021/11/28 19:28:42 deraadt Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* @@ -30,7 +30,7 @@ * SUCH DAMAGE. */ -#include <sys/param.h> /* MAXBSIZE */ +#include <sys/types.h> #include <sys/wait.h> #include <sys/mman.h> #include <sys/stat.h> @@ -51,6 +51,8 @@ #include "pathnames.h" +#define _MAXBSIZE (64 * 1024) + #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) #define DIRECTORY 0x01 /* Tell install it's a directory. */ @@ -403,7 +405,7 @@ copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size, { ssize_t nr, nw; int serrno; - char *p, buf[MAXBSIZE]; + char *p, buf[_MAXBSIZE]; if (size == 0) return; |