mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
Avoid (null) in printf
Show '[builtin]' when the library name is NULL in error messages.
This commit is contained in:
parent
328824509f
commit
3e35983f95
2 changed files with 8 additions and 4 deletions
|
|
@ -2100,10 +2100,12 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
|
|||
open_func = snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION));
|
||||
err = 0;
|
||||
if (!h) {
|
||||
SNDERR("Cannot open shared library %s", lib);
|
||||
SNDERR("Cannot open shared library %s",
|
||||
lib ? lib : "[builtin]");
|
||||
err = -ENOENT;
|
||||
} else if (!open_func) {
|
||||
SNDERR("symbol %s is not defined inside %s", open_name, lib);
|
||||
SNDERR("symbol %s is not defined inside %s", open_name,
|
||||
lib ? lib : "[builtin]");
|
||||
snd_dlclose(h);
|
||||
err = -ENXIO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,10 +388,12 @@ static int snd_pcm_hook_add_conf(snd_pcm_t *pcm, snd_config_t *root, snd_config_
|
|||
install_func = h ? snd_dlsym(h, install, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION)) : NULL;
|
||||
err = 0;
|
||||
if (!h) {
|
||||
SNDERR("Cannot open shared library %s", lib);
|
||||
SNDERR("Cannot open shared library %s",
|
||||
lib ? lib : "[builtin]");
|
||||
err = -ENOENT;
|
||||
} else if (!install_func) {
|
||||
SNDERR("symbol %s is not defined inside %s", install, lib);
|
||||
SNDERR("symbol %s is not defined inside %s", install,
|
||||
lib ? lib : "[builtin]");
|
||||
snd_dlclose(h);
|
||||
err = -ENXIO;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue