[vlc-commits] commit: net_OpenDgram don't return 0 in case of failure ( Sébastien Escudier )

git at videolan.org git at videolan.org
Thu Oct 21 08:51:06 CEST 2010


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Thu Oct 21 08:48:49 2010 +0200| [ffd3fce0a407c61e8e5aafdad666424fe5233609] | committer: Sébastien Escudier 

net_OpenDgram don't return 0 in case of failure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffd3fce0a407c61e8e5aafdad666424fe5233609
---

 src/network/udp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/network/udp.c b/src/network/udp.c
index 5af1c0b..e72c426 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -778,6 +778,7 @@ int net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
         return -1;
     }
 
+    val = -1;
     for (struct addrinfo *ptr = loc; ptr != NULL; ptr = ptr->ai_next)
     {
         int fd = net_Socket (obj, ptr->ai_family, ptr->ai_socktype,
@@ -789,7 +790,6 @@ int net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
         if( fd == -1 )
             continue;
 
-        val = -1;
         for (struct addrinfo *ptr2 = rem; ptr2 != NULL; ptr2 = ptr2->ai_next)
         {
             if ((ptr2->ai_family != ptr->ai_family)



More information about the vlc-commits mailing list