systemd/SOURCES/0942-loginctl-shorten-varia...

40 lines
1.8 KiB
Diff

From c88514d4de20ceeeea2028917087e2710ea419b2 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 23 May 2023 10:48:15 +0200
Subject: [PATCH] loginctl: shorten variable name
(cherry picked from commit 86f128558d57586bd28c55eb63968eab3dc4b36e)
Related: #2156786
---
src/login/loginctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 9b3fed928b..079c0e2b17 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -147,7 +147,7 @@ static int list_sessions(int argc, char *argv[], void *userdata) {
(void) table_set_align_percent(table, TABLE_HEADER_CELL(1), 100);
for (;;) {
- _cleanup_(sd_bus_error_free) sd_bus_error error_tty = SD_BUS_ERROR_NULL;
+ _cleanup_(sd_bus_error_free) sd_bus_error e = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply_tty = NULL;
const char *id, *user, *seat, *object, *tty = NULL;
uint32_t uid;
@@ -164,11 +164,11 @@ static int list_sessions(int argc, char *argv[], void *userdata) {
object,
"org.freedesktop.login1.Session",
"TTY",
- &error_tty,
+ &e,
&reply_tty,
"s");
if (r < 0)
- log_warning_errno(r, "Failed to get TTY for session %s: %s", id, bus_error_message(&error_tty, r));
+ log_warning_errno(r, "Failed to get TTY for session %s: %s", id, bus_error_message(&e, r));
else {
r = sd_bus_message_read(reply_tty, "s", &tty);
if (r < 0)