Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
f65454be
Commit
f65454be
authored
Dec 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use calloc instead of malloc+memset.
parent
f2014437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
src/input/vlm.c
src/input/vlm.c
+3
-5
No files found.
src/input/vlm.c
View file @
f65454be
...
...
@@ -622,10 +622,9 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
p_vlm
->
p_vod
->
pf_media_control
=
vlm_MediaVodControl
;
}
p_media
=
malloc
(
sizeof
(
vlm_media_sys_t
)
);
p_media
=
calloc
(
1
,
sizeof
(
vlm_media_sys_t
)
);
if
(
!
p_media
)
return
VLC_ENOMEM
;
memset
(
p_media
,
0
,
sizeof
(
vlm_media_sys_t
)
);
if
(
p_cfg
->
b_vod
)
p_vlm
->
i_vod
++
;
...
...
@@ -743,12 +742,10 @@ static vlm_media_instance_sys_t *vlm_ControlMediaInstanceGetByName( vlm_media_sy
}
static
vlm_media_instance_sys_t
*
vlm_MediaInstanceNew
(
vlm_t
*
p_vlm
,
const
char
*
psz_name
)
{
vlm_media_instance_sys_t
*
p_instance
=
malloc
(
sizeof
(
vlm_media_instance_sys_t
)
);
vlm_media_instance_sys_t
*
p_instance
=
calloc
(
1
,
sizeof
(
vlm_media_instance_sys_t
)
);
if
(
!
p_instance
)
return
NULL
;
memset
(
p_instance
,
0
,
sizeof
(
vlm_media_instance_sys_t
)
);
p_instance
->
psz_name
=
NULL
;
if
(
psz_name
)
p_instance
->
psz_name
=
strdup
(
psz_name
);
...
...
@@ -1154,3 +1151,4 @@ int vlm_Control( vlm_t *p_vlm, int i_query, ... )
return
i_result
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment