diff options
author | Havoc Pennington <hp@redhat.com> | 2006-09-14 13:53:16 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2006-09-14 13:53:16 +0000 |
commit | e24dec0a89a5853cb448fb3037f2658f2b682650 (patch) | |
tree | 858f3ed472fa0e3f8ccc74c292a0381ae801c944 /dbus | |
parent | d0ddf4a5dc4e4afa4a7b515595d13fa4f1b0ba9e (diff) |
2006-09-14 Havoc Pennington <hp@redhat.com>
* dbus/dbus-transport-unix.c (unix_do_iteration): fix a valgrind
complaint about accessing revents when poll returns 0, from Julian Seward.
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-transport-unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index b2f7faa3..5536e923 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -1031,6 +1031,12 @@ unix_do_iteration (DBusTransport *transport, if (poll_res >= 0) { + if (poll_res == 0) + poll_fd.revents = 0; /* some concern that posix does not guarantee this; + * valgrind flags it as an error. though it probably + * is guaranteed on linux at least. + */ + if (poll_fd.revents & _DBUS_POLLERR) do_io_error (transport); else |