changeset 26051:9eb848b34476

Avoid a pointless special-case for opening a file
author reimar
date Sun, 24 Feb 2008 11:21:27 +0000
parents 2f15c078db92
children ce480034f391
files stream/stream_file.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_file.c	Sun Feb 24 11:19:55 2008 +0000
+++ b/stream/stream_file.c	Sun Feb 24 11:21:27 2008 +0000
@@ -139,15 +139,11 @@
 #endif
     }
   } else {
-    if(mode == STREAM_READ)
-      f=open(filename,m);
-    else {
       mode_t openmode = S_IRUSR|S_IWUSR;
 #ifndef __MINGW32__
       openmode |= S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
 #endif
       f=open(filename,m, openmode);
-    }
     if(f<0) {
       mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
       m_struct_free(&stream_opts,opts);