From: Zbigniew Jędrzejewski-Szmek Date: Wed, 3 Nov 2021 10:12:25 +0000 (+0100) Subject: tree-wide: drop "f" from sd_notify() calls with a static string X-Git-Tag: v250-rc1~353^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4341b76d07fd7117a36b2f4e4b41cab41f0cf14;p=thirdparty%2Fsystemd.git tree-wide: drop "f" from sd_notify() calls with a static string If we don't need to do any formatting, let's optimize things a bit. --- diff --git a/src/core/manager.c b/src/core/manager.c index d48e0b08783..c0de6acb803 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -3465,9 +3465,9 @@ static void user_manager_send_ready(Manager *m) { if (!MANAGER_IS_USER(m) || m->ready_sent) return; - r = sd_notifyf(false, - "READY=1\n" - "STATUS=Reached " SPECIAL_BASIC_TARGET "."); + r = sd_notify(false, + "READY=1\n" + "STATUS=Reached " SPECIAL_BASIC_TARGET "."); if (r < 0) log_warning_errno(r, "Failed to send readiness notification, ignoring: %m"); diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 7dc9e068422..3727d903985 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -4245,7 +4245,7 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r return log_oom(); if (strv_find(tags, "READY=1")) { - r = sd_notifyf(false, "READY=1\n"); + r = sd_notify(false, "READY=1\n"); if (r < 0) log_warning_errno(r, "Failed to send readiness notification, ignoring: %m"); } diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index f21c5c316ba..918da195d81 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -915,7 +915,7 @@ void manager_disconnect(Manager *m) { m->event_timeout = sd_event_source_unref(m->event_timeout); - sd_notifyf(false, "STATUS=Idle."); + sd_notify(false, "STATUS=Idle."); } void manager_flush_server_names(Manager *m, ServerType t) {