X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnetwork%2Fudp.c;h=d0938b9a9cc070118f26fdd3024299644177174d;hb=fae2f3f288543e0024d9a64bf940f9bc45778ae7;hp=c55898066b602cd6bbfbb9d535c3746251190902;hpb=795fb9bc6f57b6baf2469ddba9a347da1af933c3;p=vlc diff --git a/src/network/udp.c b/src/network/udp.c index c55898066b..d0938b9a9c 100644 --- a/src/network/udp.c +++ b/src/network/udp.c @@ -31,7 +31,7 @@ # include "config.h" #endif -#include +#include #include @@ -616,10 +616,7 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port, { struct addrinfo hints, *res, *ptr; int i_val, i_handle = -1; - vlc_bool_t b_unreach = VLC_FALSE; - - if( i_port == 0 ) - i_port = 1234; /* historical VLC thing */ + bool b_unreach = false; if( i_hlim < 1 ) i_hlim = var_CreateGetInteger( p_this, "ttl" ); @@ -686,7 +683,7 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port, #else if( errno == ENETUNREACH ) #endif - b_unreach = VLC_TRUE; + b_unreach = true; else { msg_Warn( p_this, "%s port %d : %m", psz_host, i_port); @@ -833,12 +830,6 @@ int __net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind, */ int net_SetCSCov (int fd, int sendcov, int recvcov) { -#if !defined( UDPLITE_RECV_CSCOV ) && !defined( DCCP_SOCKOPT_SEND_CSCOV ) - VLC_UNUSED(sendcov); - VLC_UNUSED(recvcov); - return VLC_EGENERIC; -#endif - int type; if (getsockopt (fd, SOL_SOCKET, SO_TYPE, @@ -888,6 +879,10 @@ int net_SetCSCov (int fd, int sendcov, int recvcov) return VLC_SUCCESS; #endif } +#if !defined( UDPLITE_RECV_CSCOV ) && !defined( DCCP_SOCKOPT_SEND_CSCOV ) + VLC_UNUSED(sendcov); + VLC_UNUSED(recvcov); +#endif return VLC_EGENERIC; }