diff options
| author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-14 18:30:19 +0200 |
|---|---|---|
| committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-14 18:30:19 +0200 |
| commit | e0565eaa178fc0ad4eabcbc48c50085f95bb56a8 (patch) | |
| tree | 2538a0670c63086213af10fcc8f56532ce7a5792 /src/input/input_smb.c | |
| parent | dc36f8d045cf4f723c44766f44c92e1810e37f4f (diff) | |
| download | xine-lib-e0565eaa178fc0ad4eabcbc48c50085f95bb56a8.tar.gz xine-lib-e0565eaa178fc0ad4eabcbc48c50085f95bb56a8.tar.bz2 | |
Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element.
Diffstat (limited to 'src/input/input_smb.c')
| -rw-r--r-- | src/input/input_smb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c index 1b1f15565..4cacebf89 100644 --- a/src/input/input_smb.c +++ b/src/input/input_smb.c @@ -258,8 +258,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){ |
