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/journal/journald-server.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/journal/journald-server.c')
-rw-r--r-- | src/journal/journald-server.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 717c8e480e..211f5c3d83 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -784,12 +784,10 @@ static void server_sync(Server *s, bool wait) { "Failed to sync user journal, ignoring: %m"); } - if (s->sync_event_source) { - r = sd_event_source_set_enabled(s->sync_event_source, SD_EVENT_OFF); - if (r < 0) - log_ratelimit_error_errno(r, JOURNAL_LOG_RATELIMIT, - "Failed to disable sync timer source: %m"); - } + r = sd_event_source_set_enabled(s->sync_event_source, SD_EVENT_OFF); + if (r < 0) + log_ratelimit_warning_errno(r, JOURNAL_LOG_RATELIMIT, + "Failed to disable sync timer source, ignoring: %m"); s->sync_scheduled = false; } |