[pulseaudio-discuss] [PATCH 3/3] pacmd: add missing 'else' keyword

Boris Egorov egorov at linux.com
Mon Jan 12 09:52:12 PST 2015


See code above for proper behavior.

Issue detected by PVS Studio
---
 src/utils/pacmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index 61b87a0..7e49296 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -333,7 +333,7 @@ int main(int argc, char*argv[]) {
             if (watch_socket->revents & POLLHUP) {
                 ibuf_eof = true;
                 ibuf_length = 0;
-            } if (watch_socket->revents & POLLOUT) {
+            } else if (watch_socket->revents & POLLOUT) {
                 ssize_t r;
                 pa_assert(ibuf_length > 0);
 
-- 
2.1.4



More information about the pulseaudio-discuss mailing list