[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/13] oss: Remove unused error handling of qemu_
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v3 10/13] oss: Remove unused error handling of qemu_set_fd_handler |
Date: |
Tue, 19 May 2015 10:51:07 +0000 |
The function cannot fail, so the check is superfluous.
Signed-off-by: Fam Zheng <address@hidden>
---
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.1
- Re: [Qemu-devel] [PATCH v3 02/13] qemu-nbd: Switch to qemu_set_fd_handler, (continued)
- [Qemu-devel] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 04/13] netmap: Drop netmap_can_send, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 01/13] stubs: Add qemu_set_fd_handler, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 05/13] net/socket: Drop net_socket_can_send, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 09/13] alsaaudio: Remove unused error handling of qemu_set_fd_handler, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 10/13] oss: Remove unused error handling of qemu_set_fd_handler,
Fam Zheng <=
- [Qemu-devel] [PATCH v3 06/13] tap: Drop tap_can_send, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 11/13] xen_backend: Remove unused error handling of qemu_set_fd_handler, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 12/13] event-notifier: Always return 0 for posix implementation, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 13/13] iohandler: Change return type of qemu_set_fd_handler to "void", Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 08/13] main-loop: Drop qemu_set_fd_handler2, Fam Zheng, 2015/05/18
- [Qemu-devel] [PATCH v3 07/13] Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler, Fam Zheng, 2015/05/18
- Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2, Stefan Hajnoczi, 2015/05/19