Also replaced "continue" in while block with an empty
block (added curly braces).

Found by coverity.

Signed-off-by: Uri Lublin <u...@redhat.com>
---
 server/red-record-qxl.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
index adc487b..21fc35f 100644
--- a/server/red-record-qxl.c
+++ b/server/red-record-qxl.c
@@ -845,13 +845,18 @@ void red_record_qxl_command(RedRecord *record, 
RedMemSlotInfo *slots,
 static void child_output_setup(gpointer user_data)
 {
     int fd = GPOINTER_TO_INT(user_data);
+    int r;
 
     while (dup2(fd, STDOUT_FILENO) < 0 && errno == EINTR) {
     }
     close(fd);
 
     // make sure file is not closed calling exec()
-    fcntl(STDOUT_FILENO, F_SETFD, 0);
+    while ((r = fcntl(STDOUT_FILENO, F_SETFD, 0)) < 0 && errno == EINTR) {
+    }
+    if (r < 0) {
+        spice_error("fcntl F_SETFD failed (%d)\n", errno);
+    }
 }
 
 RedRecord *red_record_new(const char *filename)
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to