summaryrefslogtreecommitdiff
path: root/src/input/input_smb.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
commitcb2dc09164a533fc544c59469f6f8bd7d1cc5e04 (patch)
treeb6681a749f382c15f1c84f554961a9c64bd13742 /src/input/input_smb.c
parenta99bea5eb67de57de5aa3259b5b5432d4aaa9c1a (diff)
downloadxine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.gz
xine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.bz2
Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element.
(transplanted from 512894f517c423fed0cadeca0d46c6d909403106) --HG-- extra : transplant_source : Q%28%94%F5%17%C4%23%FE%D0%CA%DE%CA%0DF%C6%D9%09%401%06
Diffstat (limited to 'src/input/input_smb.c')
-rw-r--r--src/input/input_smb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c
index 7da9c1454..cdabf410c 100644
--- a/src/input/input_smb.c
+++ b/src/input/input_smb.c
@@ -256,8 +256,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){