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).
This commit is contained in:
Bruce Evans 2003-03-24 11:26:08 +00:00
parent 954a953e8d
commit 1104dd84fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112531

View File

@ -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) {