mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Added missing variable initialization in open_conf() functions (hwdep, timer); Uros
This commit is contained in:
parent
5ba91b544f
commit
f422fb9a78
4 changed files with 7 additions and 15 deletions
|
|
@ -119,6 +119,7 @@ static int snd_hwdep_open_conf(snd_hwdep_t **hwdep,
|
||||||
h = snd_dlopen(lib, RTLD_NOW);
|
h = snd_dlopen(lib, RTLD_NOW);
|
||||||
if (h)
|
if (h)
|
||||||
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_HWDEP_DLSYM_VERSION));
|
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_HWDEP_DLSYM_VERSION));
|
||||||
|
err = 0;
|
||||||
if (!h) {
|
if (!h) {
|
||||||
SNDERR("Cannot open shared library %s", lib);
|
SNDERR("Cannot open shared library %s", lib);
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
|
|
@ -130,11 +131,7 @@ static int snd_hwdep_open_conf(snd_hwdep_t **hwdep,
|
||||||
_err:
|
_err:
|
||||||
if (type_conf)
|
if (type_conf)
|
||||||
snd_config_delete(type_conf);
|
snd_config_delete(type_conf);
|
||||||
if (err >= 0)
|
return err >= 0 ? open_func(hwdep, name, hwdep_root, hwdep_conf, mode) : err;
|
||||||
err = open_func(hwdep, name, hwdep_root, hwdep_conf, mode);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_hwdep_open_noupdate(snd_hwdep_t **hwdep, snd_config_t *root, const char *name, int mode)
|
static int snd_hwdep_open_noupdate(snd_hwdep_t **hwdep, snd_config_t *root, const char *name, int mode)
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,8 @@ static int snd_seq_open_conf(snd_seq_t **seqp, const char *name,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SNDERR("Unknown field %s", id);
|
SNDERR("Unknown field %s", id);
|
||||||
|
err = -EINVAL;
|
||||||
|
goto _err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!open_name) {
|
if (!open_name) {
|
||||||
|
|
|
||||||
|
|
@ -130,11 +130,7 @@ static int snd_timer_open_conf(snd_timer_t **timer,
|
||||||
_err:
|
_err:
|
||||||
if (type_conf)
|
if (type_conf)
|
||||||
snd_config_delete(type_conf);
|
snd_config_delete(type_conf);
|
||||||
if (err >= 0)
|
return err >= 0 ? open_func(timer, name, timer_root, timer_conf, mode) : err;
|
||||||
err = open_func(timer, name, timer_root, timer_conf, mode);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_timer_open_noupdate(snd_timer_t **timer, snd_config_t *root, const char *name, int mode)
|
static int snd_timer_open_noupdate(snd_timer_t **timer, snd_config_t *root, const char *name, int mode)
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ static int snd_timer_query_open_conf(snd_timer_query_t **timer,
|
||||||
h = snd_dlopen(lib, RTLD_NOW);
|
h = snd_dlopen(lib, RTLD_NOW);
|
||||||
if (h)
|
if (h)
|
||||||
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_TIMER_QUERY_DLSYM_VERSION));
|
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_TIMER_QUERY_DLSYM_VERSION));
|
||||||
|
err = 0;
|
||||||
if (!h) {
|
if (!h) {
|
||||||
SNDERR("Cannot open shared library %s", lib);
|
SNDERR("Cannot open shared library %s", lib);
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
|
|
@ -128,11 +129,7 @@ static int snd_timer_query_open_conf(snd_timer_query_t **timer,
|
||||||
_err:
|
_err:
|
||||||
if (type_conf)
|
if (type_conf)
|
||||||
snd_config_delete(type_conf);
|
snd_config_delete(type_conf);
|
||||||
if (err >= 0)
|
return err >= 0 ? open_func(timer, name, timer_root, timer_conf, mode) : err;
|
||||||
err = open_func(timer, name, timer_root, timer_conf, mode);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_timer_query_open_noupdate(snd_timer_query_t **timer, snd_config_t *root, const char *name, int mode)
|
static int snd_timer_query_open_noupdate(snd_timer_query_t **timer, snd_config_t *root, const char *name, int mode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue