[vlc-commits] SFTP: fix warnings

Jean-Baptiste Kempf git at videolan.org
Sat Apr 13 17:19:52 CEST 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Apr 13 17:03:47 2013 +0200| [0ee42f1ac24977ca17f3db30bc7a60a6e10de741] | committer: Jean-Baptiste Kempf

SFTP: fix warnings

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

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

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 5920b21..2872963 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -84,7 +84,7 @@ struct access_sys_t
     LIBSSH2_SESSION* ssh_session;
     LIBSSH2_SFTP* sftp_session;
     LIBSSH2_SFTP_HANDLE* file;
-    int i_read_size;
+    size_t i_read_size;
 };
 
 
@@ -171,9 +171,9 @@ static int Open( vlc_object_t* p_this )
 
     char *psz_home = config_GetUserDir( VLC_HOME_DIR );
     char *psz_knownhosts_file;
-    asprintf( &psz_knownhosts_file, "%s/.ssh/known_hosts", psz_home );
-    libssh2_knownhost_readfile( ssh_knownhosts, psz_knownhosts_file,
-                                LIBSSH2_KNOWNHOST_FILE_OPENSSH );
+    if( asprintf( &psz_knownhosts_file, "%s/.ssh/known_hosts", psz_home ) != -1 )
+        libssh2_knownhost_readfile( ssh_knownhosts, psz_knownhosts_file,
+                LIBSSH2_KNOWNHOST_FILE_OPENSSH );
     free( psz_knownhosts_file );
     free( psz_home );
 



More information about the vlc-commits mailing list