From: Clemens Ladisch Date: Thu, 23 Dec 2004 08:15:46 +0000 (+0000) Subject: fix changed error message handling X-Git-Tag: v1.0.8~22 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5c9ee5ef03ae486d934e3e10ccaf8a67aed52602;p=alsa-lib.git fix changed error message handling In the last error message handling change, some error conditions didn't get properly inverted. --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 503e89a6..4c17c3e8 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -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; }