mirror of https://github.com/fairyglade/ly.git
login.c: fix several `-Werror=format-truncation`
Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
This commit is contained in:
parent
28b094febb
commit
8c6f0526ae
|
|
@ -466,7 +466,7 @@ void auth(
|
|||
struct pam_conv conv = {login_conv, creds};
|
||||
struct pam_handle* handle;
|
||||
char tty_id [3];
|
||||
snprintf(tty_id, 3, "%d", config.tty);
|
||||
snprintf(tty_id, 3, "%d", (unsigned int)config.tty % 99);
|
||||
|
||||
ok = pam_start(config.service_name, NULL, &conv, &handle);
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ void auth(
|
|||
char vt[5];
|
||||
|
||||
snprintf(display_name, 3, ":%d", display_id);
|
||||
snprintf(vt, 5, "vt%d", config.tty);
|
||||
snprintf(vt, 5, "vt%d", (unsigned int)config.tty % 99);
|
||||
|
||||
// set env
|
||||
env_init(pwd, display_name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue