From a3ada90a3753abcd420578e2226467237cbaf6fd Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 27 May 2024 09:47:51 +0200 Subject: various: remove unnecessary check before sd_event_source_set_enabled() sd_event_source_set_enabled() does the same check internally. --- src/import/curl-util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/import') 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; } -- cgit v1.2.3