diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-11-22 00:38:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-11-22 00:45:22 +0100 |
commit | 68b29a9fca915c83b9192790ec61189430cd5de6 (patch) | |
tree | 6f1d6f6e049aab2194ac66398bc304068daa3694 /src/core/unit.c | |
parent | 0b2665c33de93d576047bf55ecff9e1435033f54 (diff) |
manager: introduce watch_init() initializer for watches
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 99e1c27948..82dd617e35 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1580,7 +1580,8 @@ int unit_watch_timer(Unit *u, usec_t delay, Watch *w) { } else if (w->type == WATCH_INVALID) { ours = true; - if ((fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0) + fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC); + if (fd < 0) return -errno; } else assert_not_reached("Invalid watch type"); |