From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3OX9-0001h3-Px for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3OX5-00079q-JL for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3OX5-00079g-Et for qemu-devel@nongnu.org; Fri, 12 Jun 2015 08:58:03 -0400 From: Stefan Hajnoczi Date: Fri, 12 Jun 2015 13:57:34 +0100 Message-Id: <1434113861-26495-10-git-send-email-stefanha@redhat.com> In-Reply-To: <1434113861-26495-1-git-send-email-stefanha@redhat.com> References: <1434113861-26495-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 09/16] oss: Remove unused error handling of qemu_set_fd_handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Fam Zheng , Stefan Hajnoczi From: Fam Zheng The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng Message-id: 1433400324-7358-11-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi --- audio/ossaudio.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 4db2ca6..b9c6b30 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -138,18 +138,18 @@ static void oss_helper_poll_in (void *opaque) audio_run ("oss_poll_in"); } -static int oss_poll_out (HWVoiceOut *hw) +static void oss_poll_out (HWVoiceOut *hw) { OSSVoiceOut *oss = (OSSVoiceOut *) hw; - return qemu_set_fd_handler (oss->fd, NULL, oss_helper_poll_out, NULL); + qemu_set_fd_handler (oss->fd, NULL, oss_helper_poll_out, NULL); } -static int oss_poll_in (HWVoiceIn *hw) +static void oss_poll_in (HWVoiceIn *hw) { OSSVoiceIn *oss = (OSSVoiceIn *) hw; - return qemu_set_fd_handler (oss->fd, oss_helper_poll_in, NULL, NULL); + qemu_set_fd_handler (oss->fd, oss_helper_poll_in, NULL, NULL); } static int oss_write (SWVoiceOut *sw, void *buf, int len) @@ -634,7 +634,8 @@ static int oss_ctl_out (HWVoiceOut *hw, int cmd, ...) va_end (ap); ldebug ("enabling voice\n"); - if (poll_mode && oss_poll_out (hw)) { + if (poll_mode) { + oss_poll_out (hw); poll_mode = 0; } hw->poll_mode = poll_mode; @@ -828,7 +829,8 @@ static int oss_ctl_in (HWVoiceIn *hw, int cmd, ...) poll_mode = va_arg (ap, int); va_end (ap); - if (poll_mode && oss_poll_in (hw)) { + if (poll_mode) { + oss_poll_in (hw); poll_mode = 0; } hw->poll_mode = poll_mode; -- 2.4.2