aboutsummaryrefslogtreecommitdiff
path: root/audio/ossaudio.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2015-06-04 14:45:21 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-06-12 13:26:21 +0100
commitb027a538c6790bcfc93ef7f4819fe3e581445959 (patch)
treeefda0c36fe55f8e8889effeb8995b2d78e879a1a /audio/ossaudio.c
parentbe93f216278d84d283187c95cef16c0b60b711b8 (diff)
oss: Remove unused error handling of qemu_set_fd_handler
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-11-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r--audio/ossaudio.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 4db2ca65bf..b9c6b30ca1 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;