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
5c843e8b
Commit
5c843e8b
authored
Oct 12, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
module_get_capability(): never return NULL
parent
19b91d1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/modules/modules.c
src/modules/modules.c
+7
-9
No files found.
src/modules/modules.c
View file @
5c843e8b
...
@@ -48,13 +48,11 @@
...
@@ -48,13 +48,11 @@
*
*
* \param m the module
* \param m the module
* \param cap the capability to check
* \param cap the capability to check
* \return
TRUE if the module have
the capability
* \return
true if the module has
the capability
*/
*/
bool
module_provides
(
const
module_t
*
m
,
const
char
*
cap
)
bool
module_provides
(
const
module_t
*
m
,
const
char
*
cap
)
{
{
if
(
unlikely
(
m
->
psz_capability
==
NULL
))
return
!
strcmp
(
module_get_capability
(
m
),
cap
);
return
false
;
return
!
strcmp
(
m
->
psz_capability
,
cap
);
}
}
/**
/**
...
@@ -99,14 +97,14 @@ const char *module_get_help( const module_t *m )
...
@@ -99,14 +97,14 @@ const char *module_get_help( const module_t *m )
}
}
/**
/**
* Get
the capability for
a module
* Get
s the capability of
a module
*
*
* \param m the module
* \param m the module
*
return the capability
*
\return the capability, or "none" if unspecified
*/
*/
const
char
*
module_get_capability
(
const
module_t
*
m
)
const
char
*
module_get_capability
(
const
module_t
*
m
)
{
{
return
m
->
psz_capability
;
return
(
m
->
psz_capability
!=
NULL
)
?
m
->
psz_capability
:
"none"
;
}
}
/**
/**
...
...
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