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

reimar subversion at mplayerhq.hu
Wed Sep 8 19:50:05 CEST 2010


Author: reimar
Date: Wed Sep  8 19:50:05 2010
New Revision: 32074

Log:
Use initializer instead of memset, the memset in addition never
worked due to swapped arguments.

Modified:
   trunk/udp_sync.c

Modified: trunk/udp_sync.c
==============================================================================
--- trunk/udp_sync.c	Wed Sep  8 19:48:42 2010	(r32073)
+++ trunk/udp_sync.c	Wed Sep  8 19:50:05 2010	(r32074)
@@ -76,13 +76,12 @@ int get_udp(int blocking, float *master_
     static int sockfd;
     if (!done_init_yet) {
         struct timeval tv;
-        struct sockaddr_in servaddr;
+        struct sockaddr_in servaddr = { 0 };
 
         done_init_yet = 1;
 
         sockfd = socket(AF_INET, SOCK_DGRAM, 0);
 
-        memset(&servaddr, sizeof(servaddr), 0);
         servaddr.sin_family      = AF_INET;
         servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
         servaddr.sin_port        = htons(udp_port);


More information about the MPlayer-cvslog mailing list