X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=network.c;h=fe87a7d90f4464cc67d6ffd8e6d3cddda2463c93;hb=9c19f1c350c5d075a47a193c1b5b2d9f8fa41f04;hp=b2663581b5acb2b83b12f0e733a6c2181d8128ab;hpb=42336b017ba010d03c1db3c28c8549e5d97a1cd9;p=debian%2Fgcpegg diff --git a/network.c b/network.c index b266358..fe87a7d 100644 --- a/network.c +++ b/network.c @@ -237,7 +237,7 @@ int NetListen(int sd, char **pktbuf, size = sizeof(*sin); count = recvfrom(sd, buffer, MAXBUFSIZE, 0, - (struct sockaddr *)sin, (int *)&size); + (struct sockaddr *)sin, (socklen_t *)&size); if (count < 0) { /* Don't wait for it. */ if (errno == EWOULDBLOCK) return ERR_COMM_TMOUT; @@ -246,7 +246,7 @@ int NetListen(int sd, char **pktbuf, } #ifdef HEXDUMP - fprintf(stderr, "Received %ld bytes from %s\n", count, + fprintf(stderr, "Received %d bytes from %s\n", count, inet_ntoa(sin->sin_addr)); xd(stderr, buffer, count, FALSE); #endif @@ -274,7 +274,7 @@ int NetListen(int sd, char **pktbuf, pktsize = ntohs(rpktsize); if (pktsize != count) { #ifdef DEBUG - fprintf(stderr, "** Bad packet length: pktsize = %d, count = %ld.\n", + fprintf(stderr, "** Bad packet length: pktsize = %d, count = %d.\n", pktsize, count); #endif return ERR_PKT_BADLEN;