tftpd: cleanup

Sponsored by:	Klara, Inc.
This commit is contained in:
Dag-Erling Smørgrav 2022-11-15 23:37:54 +01:00
parent 714f6f9c14
commit eb0292d929
6 changed files with 11 additions and 9 deletions

View file

@ -7,7 +7,6 @@ PROG= tftpd
MAN= tftpd.8
SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
SRCS+= tftpd.c
WFORMAT=0
.if ${MK_TCP_WRAPPERS} != "no"
CFLAGS+= -DLIBWRAP

View file

@ -28,13 +28,13 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/tftp.h>
#include <arpa/inet.h>
#include <arpa/tftp.h>
#include <assert.h>
#include <errno.h>

View file

@ -28,10 +28,10 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <netinet/in.h>
#include <arpa/tftp.h>
@ -91,7 +91,7 @@ option_tsize(int peer __unused, struct tftphdr *tp __unused, int mode,
if (mode == RRQ)
asprintf(&options[OPT_TSIZE].o_reply,
"%ju", stbuf->st_size);
"%ju", (uintmax_t)stbuf->st_size);
else
/* XXX Allows writes of all sizes. */
options[OPT_TSIZE].o_reply =

View file

@ -28,11 +28,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/tftp.h>

View file

@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/tftp.h>

View file

@ -52,8 +52,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/tftp.h>
@ -68,6 +69,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <time.h>
#include <unistd.h>
#include "tftp-file.h"