summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/complete.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/ftp/complete.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/ftp/complete.c')
-rw-r--r--usr.bin/ftp/complete.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ftp/complete.c b/usr.bin/ftp/complete.c
index bd249f9f370..dd5c55f483e 100644
--- a/usr.bin/ftp/complete.c
+++ b/usr.bin/ftp/complete.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: complete.c,v 1.27 2014/04/23 11:47:04 jca Exp $ */
+/* $OpenBSD: complete.c,v 1.28 2015/01/16 06:40:08 deraadt Exp $ */
/* $NetBSD: complete.c,v 1.10 1997/08/18 10:20:18 lukem Exp $ */
/*-
@@ -71,7 +71,7 @@ comparstr(const void *a, const void *b)
static unsigned char
complete_ambiguous(char *word, int list, StringList *words)
{
- char insertstr[MAXPATHLEN * 2];
+ char insertstr[PATH_MAX * 2];
char *lastmatch;
int i, j;
size_t matchlen, wordlen;
@@ -151,7 +151,7 @@ static unsigned char
complete_local(char *word, int list)
{
StringList *words;
- char dir[MAXPATHLEN];
+ char dir[PATH_MAX];
char *file;
DIR *dd;
struct dirent *dp;
@@ -204,9 +204,9 @@ static unsigned char
complete_remote(char *word, int list)
{
static StringList *dirlist;
- static char lastdir[MAXPATHLEN];
+ static char lastdir[PATH_MAX];
StringList *words;
- char dir[MAXPATHLEN];
+ char dir[PATH_MAX];
char *file, *cp;
int i;
unsigned char rv;