Reduce heap allocations a bit

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2024-08-03 15:17:02 +02:00
parent b18f29a81a
commit 0bbe9c78dd
3 changed files with 19 additions and 33 deletions

View File

@@ -32,7 +32,7 @@ pub fn authenticate(config: Config, current_environment: Session.Environment, lo
// Set the XDG environment variables
setXdgSessionEnv(current_environment.display_server);
try setXdgEnv(tty_str, current_environment.xdg_session_desktop, current_environment.xdg_desktop_names orelse "");
try setXdgEnv(tty_str, current_environment.xdg_session_desktop orelse "", current_environment.xdg_desktop_names orelse "");
// Open the PAM session
var credentials = [_:null]?[*:0]const u8{ login, password };