[vlc-devel] commit: Remove dummy utf8_open() mode parameter in absence of O_CREAT flag ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Aug 15 20:26:01 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 15 21:25:21 2009 +0300| [ff1dbb489aeae4453ac2eea47e15e4e98bcb1a26] | committer: Rémi Denis-Courmont 

Remove dummy utf8_open() mode parameter in absence of O_CREAT flag

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

 modules/access/dvdnav.c    |    2 +-
 modules/access/file.c      |    2 +-
 modules/access/mmap.c      |    2 +-
 modules/access/mtp.c       |    2 +-
 modules/access/vcd/cdrom.c |    4 ++--
 modules/misc/gnutls.c      |    2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index b226b56..d6bcb5a 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1390,7 +1390,7 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
     if( !strcmp( psz_name, "-" ) ) /* stdin -> file access */
         return VLC_EGENERIC;
 
-    if( (i_fd = utf8_open( psz_name, O_RDONLY |O_NONBLOCK, 0666 )) == -1 )
+    if( (i_fd = utf8_open( psz_name, O_RDONLY |O_NONBLOCK )) == -1 )
     {
         return VLC_SUCCESS; /* Let dvdnav_open() do the probing */
     }
diff --git a/modules/access/file.c b/modules/access/file.c
index 88b4d50..817f093 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -411,7 +411,7 @@ static int open_file (access_t *p_access, const char *path)
         path++;
 #endif
 
-    int fd = utf8_open (path, O_RDONLY | O_NONBLOCK /* O_LARGEFILE*/, 0666);
+    int fd = utf8_open (path, O_RDONLY | O_NONBLOCK);
     if (fd == -1)
     {
         msg_Err (p_access, "cannot open file %s (%m)", path);
diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index e36a836..9a5ae67 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -94,7 +94,7 @@ static int Open (vlc_object_t *p_this)
     else
     {
         msg_Dbg (p_access, "opening file %s", path);
-        fd = utf8_open (path, O_RDONLY | O_NOCTTY, 0666);
+        fd = utf8_open (path, O_RDONLY | O_NOCTTY);
     }
 
     if (fd == -1)
diff --git a/modules/access/mtp.c b/modules/access/mtp.c
index 4eb32a2..91cd884 100644
--- a/modules/access/mtp.c
+++ b/modules/access/mtp.c
@@ -299,7 +299,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
  *****************************************************************************/
 static int open_file( access_t *p_access, const char *path )
 {
-    int fd = utf8_open( path, O_RDONLY | O_NONBLOCK /* O_LARGEFILE*/, 0666 );
+    int fd = utf8_open( path, O_RDONLY | O_NONBLOCK );
     if( fd == -1 )
     {
         msg_Err( p_access, "cannot open file %s (%m)", path );
diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c
index ab00b34..d0ba68c 100644
--- a/modules/access/vcd/cdrom.c
+++ b/modules/access/vcd/cdrom.c
@@ -873,7 +873,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
 
     msg_Dbg( p_this,"guessing vcd image file: %s", psz_vcdfile );
     p_vcddev->i_vcdimage_handle = utf8_open( psz_vcdfile,
-                                    O_RDONLY | O_NONBLOCK | O_BINARY, 0666 );
+                                    O_RDONLY | O_NONBLOCK | O_BINARY );
  
     while( fgets( line, 1024, cuefile ) && !b_found )
     {
@@ -903,7 +903,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
                     } else psz_vcdfile = strdup( filename );
                     msg_Dbg( p_this,"using vcd image file: %s", psz_vcdfile );
                     p_vcddev->i_vcdimage_handle = utf8_open( psz_vcdfile,
-                                        O_RDONLY | O_NONBLOCK | O_BINARY, 0666 );
+                                        O_RDONLY | O_NONBLOCK | O_BINARY );
                 }
                 b_found = true;
             default:
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index a718278..cc40818 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -587,7 +587,7 @@ gnutls_Addx509File( vlc_object_t *p_this,
 {
     struct stat st;
 
-    int fd = utf8_open (psz_path, O_RDONLY, 0);
+    int fd = utf8_open (psz_path, O_RDONLY);
     if (fd == -1)
         goto error;
 




More information about the vlc-devel mailing list