summaryrefslogtreecommitdiffstats
path: root/sbin/ping
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2003-03-24 11:26:08 +0000
committerbde <bde@FreeBSD.org>2003-03-24 11:26:08 +0000
commitc39856954997606010950253d2ad53e8dd15ecf6 (patch)
treec372e5cf1a419811517b0b8f71bb6695bfa42af7 /sbin/ping
parent7444018a7f7dcb104706ed57d241e8b7f7c1d563 (diff)
downloadFreeBSD-src-c39856954997606010950253d2ad53e8dd15ecf6.zip
FreeBSD-src-c39856954997606010950253d2ad53e8dd15ecf6.tar.gz
Fixed an errx format error in rev.1.81. This should have been fatal
when WARNS was increased recently, but __printf0like() has been temporarily disabled for 8 months. Fixed related style bugs (disordered declaraction and silly type for maxpayload -- assume 16-bit ints like the rest of ping.c).
Diffstat (limited to 'sbin/ping')
-rw-r--r--sbin/ping/ping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 08c3b5a..2fc38da 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -154,8 +154,8 @@ int mx_dup_ck = MAX_DUP_CHK;
char rcvd_tbl[MAX_DUP_CHK / 8];
struct sockaddr_in whereto; /* who to ping */
-long maxpayload;
int datalen = DEFDATALEN;
+int maxpayload;
int s; /* socket file descriptor */
u_char outpackhdr[IP_MAXPACKET], *outpack;
char BBELL = '\a'; /* characters written for MISSED and AUDIBLE */
@@ -461,7 +461,7 @@ main(argc, argv)
if (options & F_RROUTE)
maxpayload -= MAX_IPOPTLEN;
if (datalen > maxpayload)
- errx(EX_USAGE, "packet size too large: %lu > %u", datalen,
+ errx(EX_USAGE, "packet size too large: %d > %d", datalen,
maxpayload);
datap = &outpack[MINICMPLEN + phdr_len];
if (options & F_PINGFILLED) {
OpenPOWER on IntegriCloud