summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-05-27 09:47:51 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-05-30 12:11:58 +0200
commita3ada90a3753abcd420578e2226467237cbaf6fd (patch)
tree0fda8187f0de2f70dcb67b3e9ebcb165be75e71f /src/import
parenttest-network: tun/tap fd may be owned by tentative worker processes (diff)
downloadsystemd-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/import')
-rw-r--r--src/import/curl-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/import/curl-util.c b/src/import/curl-util.c
index 1628f833a9..4b65f4619f 100644
--- a/src/import/curl-util.c
+++ b/src/import/curl-util.c
@@ -142,10 +142,8 @@ static int curl_glue_timer_callback(CURLM *curl, long timeout_ms, void *userdata
}
if (timeout_ms < 0) {
- if (g->timer) {
- if (sd_event_source_set_enabled(g->timer, SD_EVENT_OFF) < 0)
- return -1;
- }
+ if (sd_event_source_set_enabled(g->timer, SD_EVENT_OFF) < 0)
+ return -1;
return 0;
}