summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/small.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-16 06:40:24 +0000
commit315054f4737a39489e0a14f3a92bff61f1592832 (patch)
tree62bf010653374ce09b6beb4dfa0414a91457233b /usr.bin/ftp/small.c
parent79e3d817585ca08a91e30ad14abe43e2ab70295f (diff)
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/ftp/small.c')
-rw-r--r--usr.bin/ftp/small.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ftp/small.c b/usr.bin/ftp/small.c
index e959a556081..8954fe93c81 100644
--- a/usr.bin/ftp/small.c
+++ b/usr.bin/ftp/small.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: small.c,v 1.2 2014/08/16 07:49:27 deraadt Exp $ */
+/* $OpenBSD: small.c,v 1.3 2015/01/16 06:40:08 deraadt Exp $ */
/* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */
/*
@@ -242,7 +242,7 @@ usage:
}
globargv2 = argv[2];
if (loc && mcase) {
- char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN];
+ char *tp = argv[1], *tp2, tmpbuf[PATH_MAX];
while (*tp && !islower(*tp)) {
tp++;
@@ -329,7 +329,7 @@ mget(int argc, char *argv[])
extern int optind, optreset;
sig_t oldintr;
int ch, xargc = 2;
- char *cp, localcwd[MAXPATHLEN], *xargv[] = { argv[0], NULL, NULL };
+ char *cp, localcwd[PATH_MAX], *xargv[] = { argv[0], NULL, NULL };
static int restartit = 0;
#ifndef SMALL
extern char *optarg;
@@ -532,7 +532,7 @@ disconnect(int argc, char *argv[])
char *
dotrans(char *name)
{
- static char new[MAXPATHLEN];
+ static char new[PATH_MAX];
char *cp1, *cp2 = new;
int i, ostop, found;
@@ -560,7 +560,7 @@ dotrans(char *name)
char *
domap(char *name)
{
- static char new[MAXPATHLEN];
+ static char new[PATH_MAX];
char *cp1 = name, *cp2 = mapin;
char *tp[9], *te[9];
int i, toks[9], toknum = 0, match = 1;