[vlc-commits] commit: Remove useless freeaddrinfo wrapper ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Apr 28 22:50:30 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 28 23:50:08 2010 +0300| [8abe30826a4cfa0d25f37d609867027e4f8c9ca5] | committer: Rémi Denis-Courmont 

Remove useless freeaddrinfo wrapper

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

 include/vlc_network.h         |    1 -
 modules/stream_out/standard.c |    4 ++--
 src/libvlccore.sym            |    1 -
 src/network/acl.c             |    4 ++--
 src/network/getaddrinfo.c     |    7 +------
 src/network/io.c              |    2 +-
 src/network/tcp.c             |    4 ++--
 src/network/udp.c             |   10 +++++-----
 src/stream_output/announce.c  |    2 +-
 9 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/include/vlc_network.h b/include/vlc_network.h
index 46b0627..77b3829 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -227,7 +227,6 @@ VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
 
 VLC_EXPORT( int, vlc_getnameinfo, ( const struct sockaddr *, int, char *, int, int *, int ) );
 VLC_EXPORT( int, vlc_getaddrinfo, ( vlc_object_t *, const char *, int, const struct addrinfo *, struct addrinfo ** ) );
-VLC_EXPORT( void, vlc_freeaddrinfo, ( struct addrinfo * ) );
 
 
 static inline bool
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 98df673..c65781c 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -438,13 +438,13 @@ static int Open( vlc_object_t *p_this )
         if ( vlc_getaddrinfo ( VLC_OBJECT(p_stream), dhost, dport, &hints, &res) == 0)
         {
             memcpy (&dst, res->ai_addr, dstlen = res->ai_addrlen);
-            vlc_freeaddrinfo (res);
+            freeaddrinfo (res);
         }
 
         if (vlc_getaddrinfo ( VLC_OBJECT(p_stream), shost, sport, &hints, &res) == 0)
         {
             memcpy (&src, res->ai_addr, srclen = res->ai_addrlen);
-            vlc_freeaddrinfo (res);
+            freeaddrinfo (res);
         }
 
         char *head = vlc_sdp_Start (VLC_OBJECT (p_stream), SOUT_CFG_PREFIX,
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 3dd5ea7..2c548b6 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -502,7 +502,6 @@ vlc_event_manager_register_event_type
 vlc_event_send
 vlc_execve
 vlc_fastmem_register
-vlc_freeaddrinfo
 vlc_fourcc_GetCodec
 vlc_fourcc_GetCodecAudio
 vlc_fourcc_GetCodecFromString
diff --git a/src/network/acl.c b/src/network/acl.c
index f10ec64..ab80f9f 100644
--- a/src/network/acl.c
+++ b/src/network/acl.c
@@ -99,11 +99,11 @@ static int ACL_Resolve( vlc_object_t *p_this, uint8_t *p_bytes,
 
         default:
             msg_Err( p_this, "unknown address family" );
-            vlc_freeaddrinfo( res );
+            freeaddrinfo( res );
             return -1;
     }
 
-    vlc_freeaddrinfo( res );
+    freeaddrinfo( res );
     return i_family;
 }
 
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index 63b6af7..ff4f0fe 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -79,7 +79,7 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
  * @param res pointer set to the resulting chained list.
  * @return 0 on success, a getaddrinfo() error otherwise.
  * On failure, *res is undefined. On success, it must be freed with
- * vlc_freeaddrinfo().
+ * freeaddrinfo().
  */
 int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
                      int i_port, const struct addrinfo *p_hints,
@@ -202,11 +202,6 @@ out:
 }
 
 
-void vlc_freeaddrinfo( struct addrinfo *infos )
-{
-    freeaddrinfo (infos);
-}
-
 /**
  * inet_pton() replacement
  */
diff --git a/src/network/io.c b/src/network/io.c
index 66d7f77..c4238d5 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -235,7 +235,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
             net_Close (fd);
     }
 
-    vlc_freeaddrinfo (res);
+    freeaddrinfo (res);
 
     if (sockv != NULL)
         sockv[sockc] = -1;
diff --git a/src/network/tcp.c b/src/network/tcp.c
index 286566f..77c7287 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -215,7 +215,7 @@ next_ai: /* failure */
         continue;
     }
 
-    vlc_freeaddrinfo( res );
+    freeaddrinfo( res );
 
     if( i_handle == -1 )
         return -1;
@@ -459,7 +459,7 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj,
         SetWBE( &buffer[2], i_port );   /* Port */
         memcpy( &buffer[4],             /* Address */
                 &((struct sockaddr_in *)(p_res->ai_addr))->sin_addr, 4 );
-        vlc_freeaddrinfo( p_res );
+        freeaddrinfo( p_res );
 
         buffer[8] = 0;                  /* Empty user id */
 
diff --git a/src/network/udp.c b/src/network/udp.c
index fd114d8..5af1c0b 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -203,7 +203,7 @@ static int net_ListenSingle (vlc_object_t *obj, const char *host, int port,
         break;
     }
 
-    vlc_freeaddrinfo (res);
+    freeaddrinfo (res);
     return val;
 }
 
@@ -723,7 +723,7 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
         }
     }
 
-    vlc_freeaddrinfo( res );
+    freeaddrinfo( res );
 
     if( i_handle == -1 )
     {
@@ -774,7 +774,7 @@ int net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
     {
         msg_Err (obj, "cannot resolve %s port %d : %s", psz_bind, i_bind,
                  gai_strerror (val));
-        vlc_freeaddrinfo (rem);
+        freeaddrinfo (rem);
         return -1;
     }
 
@@ -817,8 +817,8 @@ int net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
         net_Close (fd);
     }
 
-    vlc_freeaddrinfo (rem);
-    vlc_freeaddrinfo (loc);
+    freeaddrinfo (rem);
+    freeaddrinfo (loc);
     return val;
 }
 
diff --git a/src/stream_output/announce.c b/src/stream_output/announce.c
index 3944705..37e3300 100644
--- a/src/stream_output/announce.c
+++ b/src/stream_output/announce.c
@@ -81,7 +81,7 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
         if (res->ai_addrlen <= sizeof (p_session->addr))
             memcpy (&p_session->addr, res->ai_addr,
                     p_session->addrlen = res->ai_addrlen);
-        vlc_freeaddrinfo (res);
+        freeaddrinfo (res);
     }
 
     vlc_mutex_lock (&sap_mutex);



More information about the vlc-commits mailing list