]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
coverity: Model g_poll()
authorMarkus Armbruster <armbru@redhat.com>
Thu, 17 Dec 2015 07:20:33 +0000 (08:20 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 16:33:49 +0000 (17:33 +0100)
In my testing, Coverity reported two more CHECKED_RETURN:

* qemu-char.c:1248: fixed in commit c1f2448: "qemu-char: retry g_poll
  on EINTR".

* migration/qemu-file-unix.c:75: harmless, cleaned up in commit
  4e39f57 "migration: Clean up use of g_poll() in
  socket_writev_buffer()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1450336833-27710-1-git-send-email-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/coverity-model.c

index 617f67d716914a737999c11b546ca77d1c5ba7a7..bde7411094897716ac0dfcf880080cae6de93a95 100644 (file)
@@ -325,6 +325,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)
 {