[MPlayer-cvslog] r32094 - trunk/udp_sync.c

reimar subversion at mplayerhq.hu
Wed Sep 8 20:49:57 CEST 2010


Author: reimar
Date: Wed Sep  8 20:49:57 2010
New Revision: 32094

Log:
Use NULL for recvfrom return arguments we don't care about (source address).

Modified:
   trunk/udp_sync.c

Modified: trunk/udp_sync.c
==============================================================================
--- trunk/udp_sync.c	Wed Sep  8 20:45:34 2010	(r32093)
+++ trunk/udp_sync.c	Wed Sep  8 20:49:57 2010	(r32094)
@@ -78,9 +78,7 @@ static void set_blocking(int fd, int blo
 // otherwise, returns 0.
 static int get_udp(int blocking, float *master_position)
 {
-    struct sockaddr_in cliaddr;
     char mesg[100];
-    socklen_t len;
 
     int chars_received = -1;
     int n;
@@ -105,10 +103,8 @@ static int get_udp(int blocking, float *
 
     set_blocking(sockfd, blocking);
 
-    len = sizeof(cliaddr);
-
     while (-1 != (n = recvfrom(sockfd, mesg, sizeof(mesg)-1, 0,
-                               (struct sockaddr *)&cliaddr, &len))) {
+                               NULL, NULL))) {
         // flush out any further messages so we don't get behind
         if (chars_received == -1)
             set_blocking(sockfd, 0);


More information about the MPlayer-cvslog mailing list