summaryrefslogtreecommitdiff
path: root/src/input/input_smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_smb.c')
-rw-r--r--src/input/input_smb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c
index 1b1f15565..87f2a81fa 100644
--- a/src/input/input_smb.c
+++ b/src/input/input_smb.c
@@ -66,9 +66,10 @@ smb_plugin_get_capabilities (input_plugin_t *this_gen)
static off_t
-smb_plugin_read (input_plugin_t *this_gen, char *buf, off_t len)
+smb_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
{
smb_input_t *this = (smb_input_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, num_bytes;
num_bytes = 0;
@@ -258,8 +259,8 @@ static xine_mrl_t **smb_class_get_dir (input_class_t *this_gen,
}
if ((dir = smbc_opendir(current_path_smb)) >= 0){
- xine_mrl_t *dir_files = (xine_mrl_t *) xine_xmalloc(sizeof(xine_mrl_t) * MAXFILES);
- xine_mrl_t *norm_files = (xine_mrl_t *) xine_xmalloc(sizeof(xine_mrl_t) * MAXFILES);
+ xine_mrl_t *dir_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t));
+ xine_mrl_t *norm_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t));
int num_dir_files=0;
int num_norm_files=0;
while ((pdirent = smbc_readdir(dir)) != NULL){