From: Takashi Iwai Date: Mon, 11 May 2020 14:27:31 +0000 (+0200) Subject: pcm: rate: Fix compile warning wrt bit ops and comparison X-Git-Tag: v1.2.3~61 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c04d7bbd6cbe7db23b2dc7fbbb11fd845f648a3c;p=alsa-lib.git pcm: rate: Fix compile warning wrt bit ops and comparison We've got a gcc warning: pcm_rate.c: In function ‘snd_pcm_rate_drain’: pcm_rate.c:1090:19: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses] if (pcm->mode & SND_PCM_NONBLOCK != 0) { ^ Drop the zero comparison for fixing the warning and for simplicity. Fixes: 29041c522071 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode") Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c index 4f99a95b..980fa44e 100644 --- a/src/pcm/pcm_rate.c +++ b/src/pcm/pcm_rate.c @@ -1087,7 +1087,7 @@ static int snd_pcm_rate_drain(snd_pcm_t *pcm) if (rate->last_commit_ptr >= pcm->boundary) rate->last_commit_ptr = 0; } else if (commit_err == 0) { - if (pcm->mode & SND_PCM_NONBLOCK != 0) { + if (pcm->mode & SND_PCM_NONBLOCK) { commit_err = -EAGAIN; break; }