ANSIize, staticize, and unsignedize; set WARNS=2.

Submitted by:	Mike Barcroft <mike@q9media.com>
This commit is contained in:
Dima Dorfman 2001-06-25 21:12:52 +00:00
parent b15d61cf16
commit 789784547f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78780
2 changed files with 11 additions and 14 deletions

View File

@ -1,6 +1,7 @@
# $FreeBSD$
PROG= spray
WARNS?= 2
MAN= spray.8
DPADD= ${LIBRPCSVC}
LDADD= -lrpcsvc

View File

@ -45,8 +45,8 @@ static const char rcsid[] =
#define SPRAYOVERHEAD 86
#endif
static void usage ();
void print_xferstats ();
static void usage(void);
static void print_xferstats(unsigned int, int, double);
/* spray buffer */
char spray_buffer[SPRAYMAX];
@ -57,16 +57,14 @@ struct timeval ONE_WAY = { 0, 0 };
struct timeval TIMEOUT = { 25, 0 };
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char *argv[])
{
spraycumul host_stats;
sprayarr host_array;
CLIENT *cl;
int c;
int i;
int count = 0;
u_int i;
u_int count = 0;
int delay = 0;
int length = 0;
double xmit_time; /* time to receive data */
@ -144,7 +142,8 @@ main(argc, argv)
/* Spray server with packets */
printf ("sending %d packets of lnth %d to %s ...", count, length, *argv);
printf ("sending %u packets of lnth %d to %s ...", count, length,
*argv);
fflush (stdout);
for (i = 0; i < count; i++) {
@ -187,11 +186,8 @@ main(argc, argv)
}
void
print_xferstats(packets, packetlen, xfertime)
int packets;
int packetlen;
double xfertime;
static void
print_xferstats(u_int packets, int packetlen, double xfertime)
{
int datalen;
double pps; /* packets per second */
@ -213,7 +209,7 @@ print_xferstats(packets, packetlen, xfertime)
static void
usage ()
usage(void)
{
fprintf(stderr,
"usage: spray [-c count] [-l length] [-d delay] host\n");