qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] coverity: Model g_poll()
@ 2015-12-01 13:03 Markus Armbruster
  2015-12-01 13:13 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2015-12-01 13:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini

Coverity now reports two more CHECKED_RETURN:

* qemu-char.c:1248: Should be fixed by Paolo's "qemu-char: retry
  g_poll on EINTR".

* migration/qemu-file-unix.c:75: if g_poll() fails, we retry sending
  before the file descriptor is ready.  Errors other than EINTR are
  mostly theoretical, though.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/coverity-model.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c
index e1d5f45..ee5bf9d 100644
--- a/scripts/coverity-model.c
+++ b/scripts/coverity-model.c
@@ -342,6 +342,15 @@ char *g_strconcat(const char *s, ...)
 
 /* Other glib functions */
 
+typedef struct pollfd GPollFD;
+
+int poll();
+
+int g_poll (GPollFD *fds, unsigned nfds, int timeout)
+{
+    return poll(fds, nfds, timeout);
+}
+
 typedef struct _GIOChannel GIOChannel;
 GIOChannel *g_io_channel_unix_new(int fd)
 {
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-01 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 13:03 [Qemu-devel] [PATCH] coverity: Model g_poll() Markus Armbruster
2015-12-01 13:13 ` Paolo Bonzini
2015-12-01 13:34   ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).