summaryrefslogtreecommitdiffstats
path: root/libexec/tftpd/tftp-io.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2013-01-31 00:02:36 +0000
committermarius <marius@FreeBSD.org>2013-01-31 00:02:36 +0000
commita236fc7fcc3822483877a07e7a3e395013f66e2c (patch)
tree22aedf69650923ea0a6491f4271a369276f83046 /libexec/tftpd/tftp-io.c
parent2d2ebd5bc052ccae68bd5bc354de7f5946ee4b92 (diff)
downloadFreeBSD-src-a236fc7fcc3822483877a07e7a3e395013f66e2c.zip
FreeBSD-src-a236fc7fcc3822483877a07e7a3e395013f66e2c.tar.gz
Mark tftp_log() as __printflike() (which would have caught the bug
fixed in r246106) and deal with the fallout. MFC after: 2 weeks
Diffstat (limited to 'libexec/tftpd/tftp-io.c')
-rw-r--r--libexec/tftpd/tftp-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c
index eaf4f39..6dabf4f 100644
--- a/libexec/tftpd/tftp-io.c
+++ b/libexec/tftpd/tftp-io.c
@@ -106,13 +106,13 @@ send_packet(int peer, uint16_t block, char *pkt, int size)
for (i = 0; i < 12 ; i++) {
DROPPACKETn("send_packet", 0);
- if (sendto(peer, pkt, size, 0,
- (struct sockaddr *)&peer_sock, peer_sock.ss_len)
- == size) {
+ if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock,
+ peer_sock.ss_len) == size) {
if (i)
tftp_log(LOG_ERR,
"%s block %d, attempt %d successful",
- block, i);
+ packettype(ntohs(((struct tftphdr *)
+ (pkt))->th_opcode)), block, i);
return (0);
}
tftp_log(LOG_ERR,
OpenPOWER on IntegriCloud