]> git.sesse.net Git - vlc/blobdiff - modules/access/file.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / access / file.c
index 33c757d1b4f3c64aecb468ece9e00f8b5bd865f2..01aa0e28a177ff2b2123070c07c1a0b3842d252b 100644 (file)
@@ -31,8 +31,6 @@
 #include <vlc_access.h>
 #include <vlc_interface.h>
 
-#include <stdlib.h>
-#include <string.h>
 #include <errno.h>
 #ifdef HAVE_SYS_TYPES_H
 #   include <sys/types.h>
@@ -91,7 +89,7 @@ vlc_module_begin();
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
     add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
-    add_deprecated( "file-cat", VLC_TRUE );
+    add_obsolete_string( "file-cat" );
     set_capability( "access2", 50 );
     add_shortcut( "file" );
     add_shortcut( "stream" );
@@ -432,7 +430,7 @@ static int open_file (access_t *p_access, const char *psz_name)
     if ( !p_sys->fd )
     {
         msg_Err( p_access, "cannot open file %s", psz_name );
-        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"), 
+        intf_UserFatal( p_access, VLC_FALSE, _("File reading failed"),
                         _("VLC could not open file \"%s\"."), psz_name );
         free (path);
         return VLC_EGENERIC;
@@ -444,11 +442,12 @@ static int open_file (access_t *p_access, const char *psz_name)
     fseek( p_sys->fd, 0, SEEK_SET );
 #else
     int fd = utf8_open (path, O_RDONLY | O_NONBLOCK /* O_LARGEFILE*/, 0666);
+    free (path);
     if (fd == -1)
     {
         msg_Err (p_access, "cannot open file %s (%s)", psz_name,
                  strerror (errno));
-        intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"), 
+        intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"),
                         _("VLC could not open file \"%s\" (%s)."),
                         psz_name, strerror (errno));
         return -1;