From eba2e7f0564beb04595fcf7581f761558f877661 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 3 Dec 2020 14:18:45 +0000 Subject: [PATCH] gtestdbus: Retry writes if they fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s unlikely, but shuts up a Coverity warning. Coverity CID: #1232156 Signed-off-by: Philip Withnall --- gio/gtestdbus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 96da52c68..9cfaadbf0 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -282,10 +282,13 @@ watcher_send_command (const gchar *command) { GIOChannel *channel; GError *error = NULL; + GIOStatus status; channel = watcher_init (); - g_io_channel_write_chars (channel, command, -1, NULL, &error); + do + status = g_io_channel_write_chars (channel, command, -1, NULL, &error); + while (status == G_IO_STATUS_AGAIN); g_assert_no_error (error); g_io_channel_flush (channel, &error);