summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
committerLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
commitda19d5c19f60ec80e1733b1e994311c59c6eda73 (patch)
tree1df3b703d728471e1051e23778f857bf4adff23f /src/dbus.c
parentba1a55152c50dfbcd3d4a64353b95f4a2f37985e (diff)
src: our lord is coverity
Diffstat (limited to 'src/dbus.c')
-rw-r--r--src/dbus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus.c b/src/dbus.c
index 31b1ce6ee0..6f43c4108e 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -176,8 +176,8 @@ static dbus_bool_t bus_add_watch(DBusWatch *bus_watch, void *data) {
}
if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, w->fd, &ev) < 0) {
- free(w);
close_nointr_nofail(w->fd);
+ free(w);
return FALSE;
}
@@ -236,7 +236,7 @@ static int bus_timeout_arm(Manager *m, Watch *w) {
if (dbus_timeout_get_enabled(w->data.bus_timeout)) {
timespec_store(&its.it_value, dbus_timeout_get_interval(w->data.bus_timeout) * USEC_PER_MSEC);
- its.it_interval = its.it_interval;
+ its.it_interval = its.it_value;
}
if (timerfd_settime(w->fd, 0, &its, NULL) < 0)
@@ -269,7 +269,7 @@ static dbus_bool_t bus_add_timeout(DBusTimeout *timeout, void *data) {
if (!(w = new0(Watch, 1)))
return FALSE;
- if (!(w->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0)
+ if ((w->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0)
goto fail;
w->type = WATCH_DBUS_TIMEOUT;