aboutsummaryrefslogtreecommitdiffstats
path: root/tests/virtsock/virtsock_client_mcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/virtsock/virtsock_client_mcast.c')
-rw-r--r--tests/virtsock/virtsock_client_mcast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/virtsock/virtsock_client_mcast.c b/tests/virtsock/virtsock_client_mcast.c
index 4072f6df..b49d7551 100644
--- a/tests/virtsock/virtsock_client_mcast.c
+++ b/tests/virtsock/virtsock_client_mcast.c
@@ -10,6 +10,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
/* Adresse für multicast IP */
static char *host_name = "224.0.0.1";
static int port = 6666;
@@ -79,7 +80,7 @@ static int setup_multicast_socket(void)
int main(void)
{
int iter = 0;
- int sin_len;
+ socklen_t sin_len;
char message[256];
int socket;
struct sockaddr_in sin;
@@ -91,7 +92,7 @@ int main(void)
socket = setup_multicast_socket();
/* Broadcast-Nachrichten empfangen */
// while (iter++ <= 10) {
- while (++iter) {
+ while (++iter <= INT_MAX) {
sin_len = sizeof(sin);
char addr[32];
int port;