From 5c9ee5ef03ae486d934e3e10ccaf8a67aed52602 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 23 Dec 2004 08:15:46 +0000 Subject: [PATCH] fix changed error message handling In the last error message handling change, some error conditions didn't get properly inverted. --- src/pcm/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.3