hal: check properly for failure of libhal_find_device_by_capability() (llvm-clang-analyzer)

This commit is contained in:
Lennart Poettering 2009-09-08 23:48:47 +02:00
parent 1380f18e52
commit 157ec797dd

View file

@ -65,7 +65,7 @@ int pa_hal_get_info(pa_core *core, pa_proplist *p, int card) {
goto finish; goto finish;
} }
if (!(udis = libhal_find_device_by_capability(hal, "sound", &n, &error)) < 0) { if (!(udis = libhal_find_device_by_capability(hal, "sound", &n, &error))) {
pa_log_error("Couldn't find devices: %s: %s", error.name, error.message); pa_log_error("Couldn't find devices: %s: %s", error.name, error.message);
goto finish; goto finish;
} }