From 7a5d90b6a30bab3e14fdc0dcbf729cf57aace584 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Nov 2024 22:42:26 +0100 Subject: [PATCH] logind: indicate that 'error' parameter is input by making it const --- src/login/logind-session-dbus.c | 4 ++-- src/login/logind-session-dbus.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index 5300284e5ac..11c315ade77 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -912,7 +912,7 @@ static bool session_job_pending(Session *s) { (SESSION_CLASS_WANTS_SERVICE_MANAGER(s->class) && s->user->service_manager_job); } -int session_send_create_reply(Session *s, sd_bus_error *error) { +int session_send_create_reply(Session *s, const sd_bus_error *error) { _cleanup_(sd_bus_message_unrefp) sd_bus_message *c = NULL; _cleanup_close_ int fifo_fd = -EBADF; _cleanup_free_ char *p = NULL; @@ -968,7 +968,7 @@ int session_send_create_reply(Session *s, sd_bus_error *error) { false); } -int session_send_upgrade_reply(Session *s, sd_bus_error *error) { +int session_send_upgrade_reply(Session *s, const sd_bus_error *error) { _cleanup_(sd_bus_message_unrefp) sd_bus_message *c = NULL; assert(s); diff --git a/src/login/logind-session-dbus.h b/src/login/logind-session-dbus.h index 37a107ec336..2ff686dbd2f 100644 --- a/src/login/logind-session-dbus.h +++ b/src/login/logind-session-dbus.h @@ -15,8 +15,8 @@ int session_send_changed(Session *s, const char *properties, ...) _sentinel_; int session_send_lock(Session *s, bool lock); int session_send_lock_all(Manager *m, bool lock); -int session_send_create_reply(Session *s, sd_bus_error *error); -int session_send_upgrade_reply(Session *s, sd_bus_error *error); +int session_send_create_reply(Session *s, const sd_bus_error *error); +int session_send_upgrade_reply(Session *s, const sd_bus_error *error); int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_error *error); int bus_session_method_lock(sd_bus_message *message, void *userdata, sd_bus_error *error);