Fixed a couple compiler warnings with icc

This commit is contained in:
tedbullock 2007-10-22 04:34:45 +00:00
parent 295e96ce14
commit 447ad7b739

View File

@ -40,13 +40,13 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/socket.h>
const char *prog_name; const char *prog_name;
unsigned long num_conn, num_closed; unsigned long num_conn, num_closed;
@ -161,14 +161,14 @@ main (int argc, char **argv)
} }
sin = server_addr; sin = server_addr;
if (connect (sd, &sin, sizeof (sin)) < 0) if (connect (sd, (struct sockaddr *) &sin, sizeof (sin)) < 0)
{ {
printf("connect: %s\n", strerror (errno)); printf("connect: %s\n", strerror (errno));
switch (errno) switch (errno)
{ {
case ECONNREFUSED: case ECONNREFUSED:
/* wait for server to start up... */ /* wait for server to start up... */
usleep (1000000); sleep (1);
case ETIMEDOUT: case ETIMEDOUT:
close (sd); close (sd);
continue; continue;