Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a0b3f355
Commit
a0b3f355
authored
Feb 26, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss: return bool instead of int
Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.
parent
e1f58fdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
oss_plugin.c
src/output/oss_plugin.c
+10
-10
No files found.
src/output/oss_plugin.c
View file @
a0b3f355
...
...
@@ -92,33 +92,33 @@ oss_param_from_ioctl(unsigned param)
return
idx
;
}
static
int
static
bool
oss_find_supported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
unsigned
i
=
0
;
i
<
od
->
num_supported
[
idx
];
i
++
)
if
(
od
->
supported
[
idx
][
i
]
==
val
)
return
1
;
return
true
;
return
0
;
return
false
;
}
static
int
static
bool
oss_can_convert
(
int
idx
,
int
val
)
{
switch
(
idx
)
{
case
OSS_BITS
:
if
(
val
!=
16
)
return
0
;
return
false
;
break
;
case
OSS_CHANNELS
:
if
(
val
!=
2
)
return
0
;
return
false
;
break
;
}
return
1
;
return
true
;
}
static
int
...
...
@@ -145,17 +145,17 @@ oss_get_supported_param(struct oss_data *od, unsigned param, int val)
return
ret
;
}
static
int
static
bool
oss_find_unsupported_param
(
struct
oss_data
*
od
,
unsigned
param
,
int
val
)
{
enum
oss_param
idx
=
oss_param_from_ioctl
(
param
);
for
(
unsigned
i
=
0
;
i
<
od
->
num_unsupported
[
idx
];
i
++
)
{
if
(
od
->
unsupported
[
idx
][
i
]
==
val
)
return
1
;
return
true
;
}
return
0
;
return
false
;
}
static
void
...
...
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