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:
Clemens Ladisch 2004-12-23 08:15:46 +00:00
parent f0762bd3cd
commit 5c9ee5ef03

View file

@ -1312,7 +1312,7 @@ int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int s
if (err < 0)
return err;
}
if (! pcm->poll_fd < 0) {
if (pcm->poll_fd < 0) {
SNDMSG("poll_fd < 0");
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)
{
if (handler->type == SND_ASYNC_HANDLER_PCM) {
if (handler->type != SND_ASYNC_HANDLER_PCM) {
SNDMSG("invalid handler type %d", handler->type);
return NULL;
}