diff options
author | Jan Janssen <medhefgo@web.de> | 2022-08-29 13:07:11 +0200 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2022-08-30 12:03:28 +0200 |
commit | c0f86d66f3f6b561528e7f856f9926bec766c036 (patch) | |
tree | b5b17ffb3a41a7974ff0ad35db009b4f8aa94116 /src/login | |
parent | 125d108665506e8abfd575f2cbf7adf9d0ae0a00 (diff) | |
download | systemd-c0f86d66f3f6b561528e7f856f9926bec766c036.tar.gz |
tree-wide: Use correct format specifiers
gcc will complain about all these with -Wformat-signedness.
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/loginctl.c | 6 | ||||
-rw-r--r-- | src/login/logind.c | 2 | ||||
-rw-r--r-- | src/login/pam_systemd.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c index b2c15aad81..b46ef2bb9d 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -478,9 +478,9 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li printf("%s - ", strna(i.id)); if (i.name) - printf("%s (%"PRIu32")\n", i.name, i.uid); + printf("%s (" UID_FMT ")\n", i.name, i.uid); else - printf("%"PRIu32"\n", i.uid); + printf(UID_FMT "\n", i.uid); if (timestamp_is_set(i.timestamp.realtime)) printf("\t Since: %s; %s\n", @@ -490,7 +490,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li if (i.leader > 0) { _cleanup_free_ char *t = NULL; - printf("\t Leader: %"PRIu32, i.leader); + printf("\t Leader: " PID_FMT, i.leader); (void) get_process_comm(i.leader, &t); if (t) diff --git a/src/login/logind.c b/src/login/logind.c index 3a6a6e0748..ebea23f01d 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -776,7 +776,7 @@ static int manager_connect_console(Manager *m) { if (SIGRTMIN + 1 > SIGRTMAX) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Not enough real-time signals available: %u-%u", + "Not enough real-time signals available: %i-%i", SIGRTMIN, SIGRTMAX); assert_se(ignore_signals(SIGRTMIN + 1) >= 0); diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 98736856ee..ba8ee51ff6 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -278,7 +278,7 @@ static int get_seat_from_display(const char *display, const char **seat, uint32_ if (r < 0) return r; - if (asprintf(&sys_path, "/sys/dev/char/%d:%d", major(display_ctty), minor(display_ctty)) < 0) + if (asprintf(&sys_path, "/sys/dev/char/%u:%u", major(display_ctty), minor(display_ctty)) < 0) return -ENOMEM; r = readlink_value(sys_path, &tty); if (r < 0) |