diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-05-27 09:47:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-05-30 12:11:58 +0200 |
commit | a3ada90a3753abcd420578e2226467237cbaf6fd (patch) | |
tree | 0fda8187f0de2f70dcb67b3e9ebcb165be75e71f /src/socket-proxy/socket-proxyd.c | |
parent | test-network: tun/tap fd may be owned by tentative worker processes (diff) | |
download | systemd-a3ada90a3753abcd420578e2226467237cbaf6fd.tar.xz systemd-a3ada90a3753abcd420578e2226467237cbaf6fd.zip |
various: remove unnecessary check before sd_event_source_set_enabled()
sd_event_source_set_enabled() does the same check internally.
Diffstat (limited to 'src/socket-proxy/socket-proxyd.c')
-rw-r--r-- | src/socket-proxy/socket-proxyd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index dd9fa07153..7648a6ce7d 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -472,11 +472,9 @@ static int add_connection_socket(Context *context, int fd) { return 0; } - if (context->idle_time) { - r = sd_event_source_set_enabled(context->idle_time, SD_EVENT_OFF); - if (r < 0) - log_warning_errno(r, "Unable to disable idle timer, continuing: %m"); - } + r = sd_event_source_set_enabled(context->idle_time, SD_EVENT_OFF); + if (r < 0) + log_warning_errno(r, "Unable to disable idle timer, continuing: %m"); c = new(Connection, 1); if (!c) { |