expand buffer to silence warnings

This commit is contained in:
SpaghettiBorgar 2023-05-06 10:12:44 +02:00
parent 4ee2b3ecc7
commit ad597daf84
1 changed files with 4 additions and 5 deletions

View File

@ -501,8 +501,8 @@ void auth(
{ {
int ok; int ok;
char tty_id [3]; char tty_id [4];
snprintf(tty_id, 3, "%d", config.tty); snprintf(tty_id, 4, "%d", config.tty);
// Add XDG environment variables // Add XDG environment variables
env_xdg_session(desktop->display_server[desktop->cur]); env_xdg_session(desktop->display_server[desktop->cur]);
@ -615,8 +615,8 @@ void auth(
} }
// get a display // get a display
char vt[5]; char vt[6];
snprintf(vt, 5, "vt%d", config.tty); snprintf(vt, 6, "vt%d", config.tty);
// set env (this clears the environment) // set env (this clears the environment)
env_init(pwd); env_init(pwd);
@ -712,4 +712,3 @@ void auth(
pam_diagnose(ok, buf); pam_diagnose(ok, buf);
} }
} }