mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
Initialise variables
These were detected using clang static analyzer.
This commit is contained in:
parent
3b76d8065f
commit
92219b01b9
5 changed files with 9 additions and 6 deletions
|
|
@ -48,7 +48,7 @@ static const char* const valid_modargs[] = {
|
|||
int pa__init(pa_module*m) {
|
||||
pa_iochannel *io;
|
||||
pa_modargs *ma;
|
||||
int32_t fd;
|
||||
int32_t fd = -1;
|
||||
int r = -1;
|
||||
pa_native_options *options = NULL;
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ int pa__init(pa_module*m) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0) {
|
||||
if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0 || fd < 0) {
|
||||
pa_log("Invalid file descriptor.");
|
||||
goto finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue