Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4e752478
Commit
4e752478
authored
Apr 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless wrapper around free()
parent
6628b01c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
src/modules/configuration.c
src/modules/configuration.c
+6
-12
No files found.
src/modules/configuration.c
View file @
4e752478
...
@@ -69,12 +69,6 @@
...
@@ -69,12 +69,6 @@
static
int
ConfigStringToKey
(
const
char
*
);
static
int
ConfigStringToKey
(
const
char
*
);
static
char
*
ConfigKeyToString
(
int
);
static
char
*
ConfigKeyToString
(
int
);
static
inline
void
freenull
(
const
void
*
p
)
{
if
(
p
!=
NULL
)
free
((
void
*
)
p
);
}
static
inline
char
*
strdupnull
(
const
char
*
src
)
static
inline
char
*
strdupnull
(
const
char
*
src
)
{
{
if
(
src
==
NULL
)
if
(
src
==
NULL
)
...
@@ -678,9 +672,9 @@ void config_Free( module_t *p_module )
...
@@ -678,9 +672,9 @@ void config_Free( module_t *p_module )
if
(
IsConfigStringType
(
p_item
->
i_type
))
if
(
IsConfigStringType
(
p_item
->
i_type
))
{
{
free
null
(
p_item
->
value
.
psz
);
free
((
char
*
)
p_item
->
value
.
psz
);
free
null
(
p_item
->
orig
.
psz
);
free
((
char
*
)
p_item
->
orig
.
psz
);
free
null
(
p_item
->
saved
.
psz
);
free
((
char
*
)
p_item
->
saved
.
psz
);
}
}
if
(
p_item
->
i_list
)
if
(
p_item
->
i_list
)
...
@@ -776,7 +770,7 @@ void __config_ResetAll( vlc_object_t *p_this )
...
@@ -776,7 +770,7 @@ void __config_ResetAll( vlc_object_t *p_this )
else
else
if
(
IsConfigStringType
(
p_module
->
p_config
[
i
].
i_type
))
if
(
IsConfigStringType
(
p_module
->
p_config
[
i
].
i_type
))
{
{
free
null
(
p_module
->
p_config
[
i
].
value
.
psz
);
free
((
char
*
)
p_module
->
p_config
[
i
].
value
.
psz
);
p_module
->
p_config
[
i
].
value
.
psz
=
p_module
->
p_config
[
i
].
value
.
psz
=
strdupnull
(
p_module
->
p_config
[
i
].
orig
.
psz
);
strdupnull
(
p_module
->
p_config
[
i
].
orig
.
psz
);
}
}
...
@@ -1252,7 +1246,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
...
@@ -1252,7 +1246,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
psz_key
=
ConfigKeyToString
(
i_value
);
psz_key
=
ConfigKeyToString
(
i_value
);
fprintf
(
file
,
"%s=%s
\n
"
,
p_item
->
psz_name
,
fprintf
(
file
,
"%s=%s
\n
"
,
p_item
->
psz_name
,
psz_key
?
psz_key
:
""
);
psz_key
?
psz_key
:
""
);
free
null
(
psz_key
);
free
(
psz_key
);
p_item
->
saved
.
i
=
i_value
;
p_item
->
saved
.
i
=
i_value
;
break
;
break
;
...
@@ -1281,7 +1275,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
...
@@ -1281,7 +1275,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
if
(
b_autosave
&&
!
p_item
->
b_autosave
)
break
;
if
(
b_autosave
&&
!
p_item
->
b_autosave
)
break
;
free
null
(
p_item
->
saved
.
psz
);
free
((
char
*
)
p_item
->
saved
.
psz
);
if
(
(
psz_value
&&
p_item
->
orig
.
psz
&&
if
(
(
psz_value
&&
p_item
->
orig
.
psz
&&
strcmp
(
psz_value
,
p_item
->
orig
.
psz
))
||
strcmp
(
psz_value
,
p_item
->
orig
.
psz
))
||
!
psz_value
||
!
p_item
->
orig
.
psz
)
!
psz_value
||
!
p_item
->
orig
.
psz
)
...
...
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