mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-17 08:56:45 -05:00
fix changed error message handling
In the last error message handling change, some error conditions didn't get properly inverted.
This commit is contained in:
parent
f0762bd3cd
commit
5c9ee5ef03
1 changed files with 2 additions and 2 deletions
|
|
@ -1312,7 +1312,7 @@ int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int s
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if (! pcm->poll_fd < 0) {
|
if (pcm->poll_fd < 0) {
|
||||||
SNDMSG("poll_fd < 0");
|
SNDMSG("poll_fd < 0");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
@ -1907,7 +1907,7 @@ int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm,
|
||||||
*/
|
*/
|
||||||
snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler)
|
snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler)
|
||||||
{
|
{
|
||||||
if (handler->type == SND_ASYNC_HANDLER_PCM) {
|
if (handler->type != SND_ASYNC_HANDLER_PCM) {
|
||||||
SNDMSG("invalid handler type %d", handler->type);
|
SNDMSG("invalid handler type %d", handler->type);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue