[vlc-commits] sftp: fix variable shadowing

Tristan Matthews git at videolan.org
Mon Oct 30 20:20:35 CET 2017


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Oct 30 15:19:03 2017 -0400| [f66eb63bd6e63e40ed99f5f3e08a804e86cd0849] | committer: Tristan Matthews

sftp: fix variable shadowing

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

 modules/access/sftp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 41ae894da3..42a321c18c 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -352,21 +352,21 @@ static int Open( vlc_object_t* p_this )
     if( !url.psz_path )
     {
         const size_t i_size = 1024;
-        int i_ret;
+        int i_read;
 
         psz_remote_home = malloc( i_size );
         if( !psz_remote_home )
             goto error;
 
-        i_ret = libssh2_sftp_symlink_ex( p_sys->sftp_session, ".", 1,
-                                         psz_remote_home, i_size - 1,
-                                         LIBSSH2_SFTP_REALPATH );
-        if( i_ret <= 0 )
+        i_read = libssh2_sftp_symlink_ex( p_sys->sftp_session, ".", 1,
+                                          psz_remote_home, i_size - 1,
+                                          LIBSSH2_SFTP_REALPATH );
+        if( i_read <= 0 )
         {
             msg_Err( p_access, "Impossible to get the Home directory" );
             goto error;
         }
-        psz_remote_home[i_ret] = '\0';
+        psz_remote_home[i_read] = '\0';
         psz_path = psz_remote_home;
 
         /* store base url for directory read */



More information about the vlc-commits mailing list