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/tftp/main.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/tftp/main.c')
-rw-r--r-- | usr.bin/tftp/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index debf8dfcca8..68a6d4b6f1a 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.34 2013/11/26 21:08:12 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.35 2015/01/16 06:40:13 deraadt Exp $ */ /* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */ /* @@ -36,7 +36,6 @@ * This version includes many modifications by Jim Guyton <guyton@rand-unix> */ -#include <sys/param.h> #include <sys/socket.h> #include <sys/file.h> @@ -54,6 +53,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include "extern.h" @@ -100,7 +100,7 @@ char *prompt = "tftp"; void intr(int); int rexmtval = TIMEOUT; int maxtimeout = 5 * TIMEOUT; -char hostname[MAXHOSTNAMELEN]; +char hostname[HOST_NAME_MAX+1]; FILE *file = NULL; volatile sig_atomic_t intrflag = 0; char *ackbuf; |