[vlc-devel] commit: Use vlc_dup ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 7 14:54:45 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb  7 15:54:39 2010 +0200| [8fe4188e7efdd897641a7a28711f32cc4cd6391e] | committer: Rémi Denis-Courmont 

Use vlc_dup

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

 modules/access/file.c        |    3 +--
 modules/access_output/file.c |    2 +-
 modules/stream_out/rtcp.c    |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/access/file.c b/modules/access/file.c
index f443a7f..e9c75d2 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -68,7 +68,6 @@
 #   define lseek _lseeki64
 #elif defined( UNDER_CE )
 /* FIXME the commandline on wince is a mess */
-# define dup(a) -1
 # define PathIsNetworkPathW(wpath) (! wcsncmp(wpath, L"\\\\", 2))
 #endif
 
@@ -145,7 +144,7 @@ int Open( vlc_object_t *p_this )
         int oldfd = strtol (path, &end, 10);
 
         if (*end == '\0')
-            fd = dup (oldfd);
+            fd = vlc_dup (oldfd);
 #ifdef HAVE_FDOPENDIR
         else if (*end == '/' && end > path)
         {
diff --git a/modules/access_output/file.c b/modules/access_output/file.c
index 73bd8d5..36abb60 100644
--- a/modules/access_output/file.c
+++ b/modules/access_output/file.c
@@ -119,7 +119,7 @@ static int Open( vlc_object_t *p_this )
 #ifdef WIN32
         setmode (fileno (stdout), O_BINARY);
 #endif
-        fd = dup (fileno (stdout));
+        fd = vlc_dup (fileno (stdout));
         msg_Dbg( p_access, "using stdout" );
 #else
 #warning stdout is not supported on Windows Mobile, but may be used on Windows CE
diff --git a/modules/stream_out/rtcp.c b/modules/stream_out/rtcp.c
index 54e2c83..2821c5c 100644
--- a/modules/stream_out/rtcp.c
+++ b/modules/stream_out/rtcp.c
@@ -82,7 +82,7 @@ rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
     {
         /* RTP/RTCP mux: duplicate the socket */
 #ifndef WIN32
-        fd = dup (rtp_fd);
+        fd = vlc_dup (rtp_fd);
 #elif defined(UNDER_CE)
  #warning Muxed RTP/RTCP unimplemented!
         fd = -1;




More information about the vlc-devel mailing list